3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/Moscow'); $dateTimeZone = new DateTimeZone('Asia/Taipei'); var_dump($dateTimeZone->getOffset(new DateTime())); var_dump(timezone_name_from_abbr("", 28800, 0));
based on 1qPqL
Output for 5.4.26 - 7.2.0
int(28800) string(13) "Asia/Shanghai"
Output for 5.2.0 - 5.4.25
int(28800) bool(false)
Output for 5.1.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/sUZCm on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function date_default_timezone_set() in /in/sUZCm on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: date_default_timezone_set() in /in/sUZCm on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: date_default_timezone_set() in /in/sUZCm on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: date_default_timezone_set() in /in/sUZCm on line 2