3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(new DateTime('2015-12-27 18:54:26')); var_dump(new DateTime('2015-12-27 18:54')); var_dump(new DateTime('2015-12-27')); var_dump(new DateTime('20'));
Output for git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 18:54:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 18:54:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: Failed to parse time string (20) at position 0 (2): Unexpected character in /in/KTVvi:6 Stack trace: #0 /in/KTVvi(6): DateTime->__construct('20') #1 {main} thrown in /in/KTVvi on line 6
Process exited with code 255.
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 18:54:26.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 18:54:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#1 (3) { ["date"]=> string(26) "2015-12-27 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (20) at position 0 (2): Unexpected character in /in/KTVvi:6 Stack trace: #0 /in/KTVvi(6): DateTime->__construct('20') #1 {main} thrown in /in/KTVvi 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:
49.38 ms | 402 KiB | 8 Q