3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '20230121'; $date_from_format = DateTime::createFromFormat('Ymd', $date, new DateTimeZone('Euroe/Berlin')); print_r([ $date_from_format->format('j'), $date_from_format->format('F'), $date_from_format->format('Y'), ]);
Output for 8.3.0 - 8.3.6
Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (Euroe/Berlin) in /in/jpuGK:5 Stack trace: #0 /in/jpuGK(5): DateTimeZone->__construct('Euroe/Berlin') #1 {main} thrown in /in/jpuGK on line 5
Process exited with code 255.
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (Euroe/Berlin) in /in/jpuGK:5 Stack trace: #0 /in/jpuGK(5): DateTimeZone->__construct('Euroe/Berlin') #1 {main} thrown in /in/jpuGK on line 5
Process exited with code 255.

preferences:
97.83 ms | 402 KiB | 89 Q