3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d1 = new DateTime('now+02:00'); $d2 = new DateTime(); $d2->setTimezone($d1->getTimezone()); var_dump($d1, $d2, $d3);
Output for git.master
Warning: Undefined variable $d3 in /in/AE38E on line 6 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-05 08:32:20.003633" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-05 09:32:20.003640" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } NULL
Output for git.master_jit
Warning: Undefined variable $d3 in /in/AE38E on line 6 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-05 08:32:20.004020" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-05 09:32:20.004027" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } NULL
Output for rfc.property-hooks
Warning: Undefined variable $d3 in /in/AE38E on line 6 object(DateTime)#1 (3) { ["date"]=> string(26) "2015-11-05 08:32:20.003506" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } object(DateTime)#2 (3) { ["date"]=> string(26) "2015-11-05 09:32:20.003508" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+02:00" } NULL

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:
63.59 ms | 401 KiB | 8 Q