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

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- DatePeriod: Test read only properties --INI-- date.timezone=UTC --FILE-- <?php $..

Decoded Output download

--TEST--
DatePeriod: Test read only properties
--INI--
date.timezone=UTC
--FILE--
<?php

$start = new DateTime;
$interval = new DateInterval('P1D');
$end = new DateTime;
$period = new DatePeriod($start, $interval, $end);

echo "recurrences: ";
var_dump($period->recurrences);

echo "include_start_date: ";
var_dump($period->include_start_date);

echo "start: ";
var_dump($period->start == $start);

echo "current: ";
var_dump($period->current);

echo "end: ";
var_dump($period->end == $end);

echo "interval: ";
var_dump($period->interval->format("%R%d"));
?>
--EXPECT--
recurrences: int(1)
include_start_date: bool(true)
start: bool(true)
current: NULL
end: bool(true)
interval: string(2) "+1"

Did this file decode correctly?

Original Code

--TEST--
DatePeriod: Test read only properties
--INI--
date.timezone=UTC
--FILE--
<?php

$start = new DateTime;
$interval = new DateInterval('P1D');
$end = new DateTime;
$period = new DatePeriod($start, $interval, $end);

echo "recurrences: ";
var_dump($period->recurrences);

echo "include_start_date: ";
var_dump($period->include_start_date);

echo "start: ";
var_dump($period->start == $start);

echo "current: ";
var_dump($period->current);

echo "end: ";
var_dump($period->end == $end);

echo "interval: ";
var_dump($period->interval->format("%R%d"));
?>
--EXPECT--
recurrences: int(1)
include_start_date: bool(true)
start: bool(true)
current: NULL
end: bool(true)
interval: string(2) "+1"

Function Calls

None

Variables

None

Stats

MD5 78a66ccf433e4178e6a406bda0d02c12
Eval Count 0
Decode Time 80 ms