3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = \DateTime::createFromFormat("H:i:s", "17:30:23"); var_dump($val); $val = new DateTime($val->format('U')); var_dump($val);
Output for git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-06 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: Failed to parse time string (1410017423) at position 7 (4): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1410017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-09-06 17:30:23.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (1410017423) at position 7 (4): Unexpected character in /in/m6eZi:6 Stack trace: #0 /in/m6eZi(6): DateTime->__construct('1410017423') #1 {main} thrown in /in/m6eZi on line 6
Process exited with code 255.

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