Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php // Function to get all the dates in given range function getDatesFromRange($..

Decoded Output download

<?php  
   
// Function to get all the dates in given range  
function getDatesFromRange($start, $end, $format = 'Y-m-d') {  
       
    // Declare an empty array  
    $array = array();  
       
    // Variable that store the date interval  
    // of period 1 day  
    $interval = new DateInterval('P1D');  
   
    $realEnd = new DateTime($end);  
    $realEnd->add($interval);  
   
    $period = new DatePeriod(new DateTime($start), $interval, $realEnd);  
   
    // Use loop to store date into array  
    foreach($period as $date) {                   
        $array[] = $date->format($format);   
    }  
   
    // Return the array elements  
    return $array;  
}  
   
// Function call with passing the start date and end date  
$Date = getDatesFromRange('2010-10-01', '2010-10-05');  
   
var_dump($Date);  
   
?> 

Did this file decode correctly?

Original Code

<?php 
  
// Function to get all the dates in given range 
function getDatesFromRange($start, $end, $format = 'Y-m-d') { 
      
    // Declare an empty array 
    $array = array(); 
      
    // Variable that store the date interval 
    // of period 1 day 
    $interval = new DateInterval('P1D'); 
  
    $realEnd = new DateTime($end); 
    $realEnd->add($interval); 
  
    $period = new DatePeriod(new DateTime($start), $interval, $realEnd); 
  
    // Use loop to store date into array 
    foreach($period as $date) {                  
        $array[] = $date->format($format);  
    } 
  
    // Return the array elements 
    return $array; 
} 
  
// Function call with passing the start date and end date 
$Date = getDatesFromRange('2010-10-01', '2010-10-05'); 
  
var_dump($Date); 
  
?> 

Function Calls

getDatesFromRange 1

Variables

$end 2010-10-05
$array []
$start 2010-10-01
$format None

Stats

MD5 fb5e01ad002ac81c759e7f692e0693c3
Eval Count 0
Decode Time 80 ms