3v4l.org

run code in 300+ PHP versions simultaneously
<?php new DateTimeImmutable('2022-123-20 22:00');
Output for 8.1.7
Output for 8.1.0 - 8.1.6
Fatal error: Uncaught Exception: Failed to parse time string (2022-123-20 22:00) at position 7 (3): Unexpected character in /in/fFt1B:3 Stack trace: #0 /in/fFt1B(3): DateTimeImmutable->__construct('2022-123-20 22:...') #1 {main} thrown in /in/fFt1B on line 3
Process exited with code 255.
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.20
Fatal error: Uncaught Exception: DateTimeImmutable::__construct(): Failed to parse time string (2022-123-20 22:00) at position 7 (3): Unexpected character in /in/fFt1B:3 Stack trace: #0 /in/fFt1B(3): DateTimeImmutable->__construct('2022-123-20 22:...') #1 {main} thrown in /in/fFt1B on line 3
Process exited with code 255.

preferences:
43.18 ms | 416 KiB | 12 Q