3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userDate = '2014-05-15 16:37:23'; $userOffset = '+04:00'; $date = new \DateTime($userDate . ' ' . $userOffset); var_dump($date); $date->setTimezone(new \DateTimeZone('UTC')); var_dump($date); echo $date->format('Y-m-d H:i:s');
Output for git.master_jit, git.master, rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-05-15 16:37:23.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+04:00" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-05-15 12:37:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(3) "UTC" } 2014-05-15 12:37:23

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:
52.03 ms | 402 KiB | 8 Q