3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timezone = '+ThisShouldProbablyThrowAnError'; var_dump(new DateTimeZone( $timezone ));
Output for 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (+ThisShouldProbablyThrowAnError) in /in/SE0oA:4 Stack trace: #0 /in/SE0oA(4): DateTimeZone->__construct('+ThisShouldProb...') #1 {main} thrown in /in/SE0oA on line 4
Process exited with code 255.
Output for 8.0.10 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (+ThisShouldProbablyThrowAnError) in /in/SE0oA:4 Stack trace: #0 /in/SE0oA(4): DateTimeZone->__construct('+ThisShouldProb...') #1 {main} thrown in /in/SE0oA on line 4
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.9
object(DateTimeZone)#1 (2) { ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" }

preferences:
103.64 ms | 409 KiB | 5 Q