3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('2013-11-17 17:48:00', new DateTimeZone('America\NewYork')); $date->setTimeZone(new DateTimeZone('UTC')); var_dump($date->format('r'));
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (America\NewYork) in /in/WRgGt:3 Stack trace: #0 /in/WRgGt(3): DateTimeZone->__construct('America\\NewYork') #1 {main} thrown in /in/WRgGt on line 3
Process exited with code 255.
Output for 5.4.27 - 5.4.45, 5.5.11 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (America\NewYork)' in /in/WRgGt:3 Stack trace: #0 /in/WRgGt(3): DateTimeZone->__construct('America\\NewYork') #1 {main} thrown in /in/WRgGt on line 3
Process exited with code 255.
Output for 5.2.0 - 5.4.26, 5.5.0 - 5.5.10
Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (America\NewYork)' in /in/WRgGt:3 Stack trace: #0 /in/WRgGt(3): DateTimeZone->__construct('America\NewYork') #1 {main} thrown in /in/WRgGt on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/WRgGt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/WRgGt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/WRgGt on line 3