3v4l.org

run code in 500+ PHP versions simultaneously
<?php $d = new DateTimeImmutable("3 Mondays after 2022-01-01 00:00:00"); echo $d->format("Y-m-d l");
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.6
2022-01-17 Monday
Output for 8.1.7 - 8.1.34, 8.2.0 - 8.2.34
Fatal error: Uncaught Exception: Failed to parse time string (3 Mondays after 2022-01-01 00:00:00) at position 10 (a): The timezone could not be found in the database in /in/YO1fV:3 Stack trace: #0 /in/YO1fV(3): DateTimeImmutable->__construct('3 Mondays after...') #1 {main} thrown in /in/YO1fV on line 3
Process exited with code 255.
Output for 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (3 Mondays after 2022-01-01 00:00:00) at position 10 (a): The timezone could not be found in the database in /in/YO1fV:3 Stack trace: #0 /in/YO1fV(3): DateTimeImmutable->__construct('3 Mondays after...') #1 {main} thrown in /in/YO1fV on line 3
Process exited with code 255.

preferences:
17.7 ms | 1144 KiB | 11 Q