<?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";
- Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.2 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- 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.
preferences:
207.32 ms | 401 KiB | 302 Q