3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function TimeZones() { $timezones = array(); try { $tz = DateTimeZone1::listIdentifiers(); if (is_array($tz) && count($tz) >= 1) $timezones = $tz; } catch (Exception $e) { } return $timezones; } var_dump(count(TimeZones()));
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Class 'DateTimeZone1' not found in /in/KMHG6:6 Stack trace: #0 /in/KMHG6(15): TimeZones() #1 {main} thrown in /in/KMHG6 on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Class undefined: DateTimeZone1 in /in/KMHG6 on line 6
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Class 'DateTimeZone1' not found in /in/KMHG6 on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/KMHG6 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '{' in /in/KMHG6 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/KMHG6 on line 5
Process exited with code 255.