3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $offset = ( 720 / 60 )*3600; var_dump($offset); $orderdate = new DateTime('2005-10-10'); $timeZoneName = timezone_name_from_abbr("", (intval($_REQUEST['tzo'])/60)*3600, 1); $orderdate->setTimezone(new DateTimezone($timeZoneName)); var_dump($orderdate->format('c e T')); $orderdate->setTimezone(new DateTimeZone('CET')); var_dump($orderdate->format('c e T'));
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.1.0
int(43200) Notice: Undefined index: tzo in /in/nBPRl on line 6 string(47) "2005-10-09T22:00:00+00:00 Atlantic/Azores AZOST" string(33) "2005-10-09T23:00:00+01:00 CET CET"
Output for hhvm-3.10.0 - 3.12.0
int(43200) Notice: Undefined index: tzo in /in/nBPRl on line 6 string(47) "2005-10-09T22:00:00+00:00 Atlantic/Azores AZOST" string(34) "2005-10-10T00:00:00+02:00 CET CEST"
Output for 5.3.0 - 5.4.45
int(43200) Notice: Undefined index: tzo in /in/nBPRl on line 6 string(47) "2005-10-09T22:00:00+00:00 Atlantic/Azores AZOST" string(44) "2005-10-10T00:00:00+02:00 Europe/Berlin CEST"
Output for 5.2.0 - 5.2.17
int(43200) Notice: Undefined index: tzo in /in/nBPRl on line 6 string(47) "2005-10-09T22:00:00+00:00 Atlantic/Azores AZOST" string(44) "2005-10-10T00:00:00+02:00 Europe/Berlin CEST"
Output for 5.0.0 - 5.1.6
int(43200) Fatal error: Class 'DateTime' not found in /in/nBPRl on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
int(43200) Fatal error: Cannot instantiate non-existent class: datetime in /in/nBPRl on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
int(43200) Fatal error: Cannot instantiate non-existent class: datetime in /in/nBPRl on line 5