3v4l.org

run code in 300+ PHP versions simultaneously
<?php $eet = new DateTimeZone('EET'); $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:51:31.003644" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:51:31.003644" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for git.master_jit
object(DateTime)#3 (3) { ["date"]=> string(26) "2015-11-06 17:51:31.003901" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:51:31.003901" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }
Output for rfc.property-hooks
object(DateTime)#3 (3) { ["date"]=> string(26) "2015-11-06 17:51:31.003799" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Moscow" } object(DateTime)#4 (3) { ["date"]=> string(26) "2015-11-06 16:51:31.003799" ["timezone_type"]=> int(2) ["timezone"]=> string(3) "EET" }

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