3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( (new DateTimeImmutable()) ->modify('potato') );
Output for 8.3.0 - 8.3.14, 8.4.1
Fatal error: Uncaught DateMalformedStringException: DateTimeImmutable::modify(): Failed to parse time string (potato) at position 0 (p): The timezone could not be found in the database in /in/Xrjlc:6 Stack trace: #0 /in/Xrjlc(6): DateTimeImmutable->modify('potato') #1 {main} thrown in /in/Xrjlc on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26
Warning: DateTimeImmutable::modify(): Failed to parse time string (potato) at position 0 (p): The timezone could not be found in the database in /in/Xrjlc on line 6 bool(false)

preferences:
88.21 ms | 408 KiB | 5 Q