3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zone = new \DateTimeZone('Etc/GMT +0200'); var_dump($zone->getLocation());
Output for 8.3.0 - 8.3.4, 8.3.6
Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (Etc/GMT +0200) in /in/SNBEX:3 Stack trace: #0 /in/SNBEX(3): DateTimeZone->__construct('Etc/GMT +0200') #1 {main} thrown in /in/SNBEX on line 3
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Uncaught DateInvalidTimeZoneException: DateTimeZone::__construct(): Unknown or bad timezone (Etc/GMT +0200) in /in/SNBEX:3 Stack trace: #0 /in/SNBEX(3): DateTimeZone->__construct('Etc/GMT +0200') #1 {main} thrown in /in/SNBEX on line 3
Process exited with code 255.
Output for 8.0.21 - 8.0.30, 8.1.8 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (Etc/GMT +0200) in /in/SNBEX:3 Stack trace: #0 /in/SNBEX(3): DateTimeZone->__construct('Etc/GMT +0200') #1 {main} thrown in /in/SNBEX on line 3
Process exited with code 255.
Output for 7.4.26 - 7.4.33, 8.0.13 - 8.0.20, 8.1.0 - 8.1.7
array(4) { ["country_code"]=> string(2) "??" ["latitude"]=> float(-90) ["longitude"]=> float(-180) ["comments"]=> string(0) "" }
Output for 5.5.10 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12
array(4) { ["country_code"]=> string(2) "??" ["latitude"]=> float(0) ["longitude"]=> float(0) ["comments"]=> string(0) "" }
Output for 5.5.0 - 5.5.9
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (Etc/GMT +0200)' in /in/SNBEX:3 Stack trace: #0 /in/SNBEX(3): DateTimeZone->__construct('Etc/GMT +0200') #1 {main} thrown in /in/SNBEX on line 3
Process exited with code 255.

preferences:
244.16 ms | 401 KiB | 294 Q