3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_REQUEST['tzo'] = -420; $orderdate = new DateTime('2005-10-10'); $timeZoneName = timezone_name_from_abbr("", (-intval($_REQUEST['tzo'])/60)*3600, 1); $orderdate->setTimezone(new DateTimezone($timeZoneName)); var_dump($date->format('c e T')); $date->setTimezone(new DateTimeZone('CET')); var_dump($date->format('c e T'));
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: date in /in/QKTLO on line 7 Fatal error: Uncaught Error: Call to a member function format() on null in /in/QKTLO:7 Stack trace: #0 {main} thrown in /in/QKTLO on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: date in /in/QKTLO on line 7 Fatal error: Uncaught Error: Call to a member function format() on unknown in /in/QKTLO:7 Stack trace: #0 {main} thrown in /in/QKTLO on line 7
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: date in /in/QKTLO on line 7 Fatal error: Call to a member function format() on null in /in/QKTLO on line 7
Process exited with code 255.
Output for 5.2.0 - 5.5.35
Notice: Undefined variable: date in /in/QKTLO on line 7 Fatal error: Call to a member function format() on a non-object in /in/QKTLO on line 7
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/QKTLO on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/QKTLO on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/QKTLO on line 4