3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2013-04-27 00:00:00'); var_dump($date); $toto = $date->format('d/m/Y'); var_dump($toto); var_dump($date->modify('d/m/Y'));
Output for git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-04-27 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "27/04/2013" Warning: DateTime::modify(): Failed to parse time string (d/m/Y) at position 1 (/): Unexpected character in /in/upTaN on line 6 bool(false)
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-04-27 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(10) "27/04/2013" Fatal error: Uncaught DateMalformedStringException: DateTime::modify(): Failed to parse time string (d/m/Y) at position 1 (/): Unexpected character in /in/upTaN:6 Stack trace: #0 /in/upTaN(6): DateTime->modify('d/m/Y') #1 {main} thrown in /in/upTaN 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:
51.54 ms | 401 KiB | 8 Q