-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Description
Description
The following code:
<?php
new DateTimeImmutable('2022-123-20 22:00');
Resulted in this output:
But I expected this output instead:
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
PHP Version
8.1.7
Operating System
No response