3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTime('2010-01-01 08:45:00', new DateTimeZone('UTC')); $str = $a->format(DateTime::ISO8601); $b = new DateTime($str, new DateTimeZone('UTC')); echo "\n"; echo "a->timezone_type: " . $a->timezone_type . "\n"; echo "b->timezone_type: " . $b->timezone_type . "\n"; echo "\na: " . print_r($a, true) . "\n"; echo "\nstr: $str\n"; echo "b: " . print_r($b, true) . "\n"; echo "a->timezone_type: " . $a->timezone_type . "\n"; echo "b->timezone_type: " . $b->timezone_type . "\n"; $eq = ($a == $b); echo "\na == b: $eq\n";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined property: DateTime::$timezone_type in /in/NgXlF on line 7 a->timezone_type: Warning: Undefined property: DateTime::$timezone_type in /in/NgXlF on line 8 b->timezone_type: a: DateTime Object ( [date] => 2010-01-01 08:45:00.000000 [timezone_type] => 3 [timezone] => UTC ) str: 2010-01-01T08:45:00+0000 b: DateTime Object ( [date] => 2010-01-01 08:45:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) Warning: Undefined property: DateTime::$timezone_type in /in/NgXlF on line 14 a->timezone_type: Warning: Undefined property: DateTime::$timezone_type in /in/NgXlF on line 15 b->timezone_type: a == b: 1

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.68 ms | 402 KiB | 8 Q