3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = DateTime::createFromFormat('Y-m-d', '1990-49-85'); var_dump($a); $b = new DateTime('2025-11-31'); var_dump($b); $c = new DateTime('1990-49-85'); var_dump($c);
Output for git.master_jit, git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "1994-03-26 23:43:16.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2025-12-01 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (1990-49-85) at position 6 (9): Unexpected character in /in/W2fSu:11 Stack trace: #0 /in/W2fSu(11): DateTime->__construct('1990-49-85') #1 {main} thrown in /in/W2fSu on line 11
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:
41.69 ms | 406 KiB | 5 Q