3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( new \DateTime('tomorrow') ); var_dump( new \DateTime('-1 week|') ); var_dump( (new \DateTime('2015-03-04'))->format('H:i') ); var_dump( \DateTime::createFromFormat('Y-m-d', '2015-03-04')->format('H:i') ); var_dump( \DateTime::createFromFormat('!Y-m-d', '2015-03-04')->format('H:i') ); var_dump( \DateTime::createFromFormat('|Y-m-d', '2015-03-04')->format('H:i') );
Output for git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-05 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught Exception: Failed to parse time string (-1 week|) at position 7 (|): Unexpected character in /in/0nWtB:8 Stack trace: #0 /in/0nWtB(8): DateTime->__construct('-1 week|') #1 {main} thrown in /in/0nWtB on line 8
Process exited with code 255.
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-07-05 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (-1 week|) at position 7 (|): Unexpected character in /in/0nWtB:8 Stack trace: #0 /in/0nWtB(8): DateTime->__construct('-1 week|') #1 {main} thrown in /in/0nWtB on line 8
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:
65.75 ms | 401 KiB | 8 Q