3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d1=new DateTimeImmutable('03/08/2015 1:59am GMT-05:00'); echo $d1->format(DateTime::ISO8601)."\n"; $d2 = $d1->modify('+0 hours'); echo $d2->format(DateTime::ISO8601)."\n"; echo "--\n"; $d1=new DateTimeImmutable('03/08/2015 1:59am GMT-05:00'); echo $d1->format(DateTime::ISO8601)."\n"; $d2 = clone $d1; echo $d2->format(DateTime::ISO8601)."\n";
based on QKTeY
Output for 5.5.0 - 5.6.28, 7.0.2 - 7.2.0
2015-03-08T01:59:00-0500 2015-03-08T01:59:00-0500 -- 2015-03-08T01:59:00-0500 2015-03-08T01:59:00-0500
Output for 7.0.0 - 7.0.1

Process exited with code 137.
Output for 5.4.0 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/97Irf on line 3
Process exited with code 255.