3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $d = new DateTimeZone(date_create('+01:00')->getTimeZone()->getName()); echo $d->getName();
based on 08ZG4
Output for 5.5.10 - 5.6.28, 7.0.0 - 7.1.0
+01:00
Output for 5.2.0 - 5.2.5, hhvm-3.10.0 - 3.12.0
Europe/Amsterdam
Output for 5.2.6 - 5.5.9
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (+01:00)' in /in/CsoQT:3 Stack trace: #0 /in/CsoQT(3): DateTimeZone->__construct('+01:00') #1 {main} thrown in /in/CsoQT on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/CsoQT on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/CsoQT on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/CsoQT on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/CsoQT on line 3
Process exited with code 255.