3v4l.org

run code in 300+ PHP versions simultaneously
<?php $eet = new DateTimeZone('Europe/Helsinki'); $msk = new DateTimeZone('Europe/Moscow'); $d = (new DateTime('now', $msk))->setTimezone($eet); $d1 = clone $d; $d->setTimezone($msk); var_dump($d, $d1);
Output for git.master
object(DateTime)#3 (3) { ["date"]=> string(26) "2015-11-06 17:27:33.003642" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:27:33.003642" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for git.master_jit
object(DateTime)#3 (3) { ["date"]=> string(26) "2015-11-06 17:27:33.004183" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:27:33.004183" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }
Output for rfc.property-hooks
object(DateTime)#3 (3) { ["date"]=> string(26) "2015-11-06 17:27:33.003544" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:27:33.003544" ["timezone_type"]=> int(3) ["timezone"]=> string(15) "Europe/Helsinki" }

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