3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateTime = new DateTimeImmutable('2014-10-26 01:00:00', new DateTimeZone('Europe/Berlin')); var_dump($dateTime->format(DATE_ISO8601)); $test = $dateTime->modify('+61 minutes'); var_dump($test->format(DATE_ISO8601)); $test = $dateTime->modify('+121 minutes'); var_dump($test->format(DATE_ISO8601));
based on Ug5S3
Output for 5.5.24 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
string(24) "2014-10-26T01:00:00+0200" string(24) "2014-10-26T02:01:00+0100" string(24) "2014-10-26T03:01:00+0100"
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/5vF02 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/5vF02 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimeimmutable in /in/5vF02 on line 3