3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tz = new DateTimeZone('Europe/Prague'); $dt = new DateTimeImmutable('2014-10-26 01:00:00', $tz); var_dump($dt->format(DATE_ISO8601)); var_dump($dt->modify('+1 hour')->format(DATE_ISO8601));
based on v3E7U
Output for 5.5.24 - 7.1.0
string(24) "2014-10-26T01:00:00+0200" string(24) "2014-10-26T02:00:00+0100"
Output for 5.2.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/ZvK9v on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/ZvK9v 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/ZvK9v on line 6
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/ZvK9v on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ZvK9v on line 6
Process exited with code 255.