3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo date('H:i:s Y-m-d',strtotime("midnight today")); echo (new DateTime("2015-11-05 16:00:00") < new DateTime(strtotime("midnight today")) ? "earlier" : "later"); echo (new DateTime("2015-11-04 16:00:00") < new DateTime(strtotime("midnight today")) ? "earlier" : "later");
based on TWqZu
Output for 7.0.0 - 7.2.0
00:00:00 2015-11-05 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1446678000) at position 8 (0): Unexpected character in /in/rvZtb:4 Stack trace: #0 /in/rvZtb(4): DateTime->__construct('1446678000') #1 {main} thrown in /in/rvZtb on line 4
Process exited with code 255.
Output for 5.5.0 - 5.6.28
00:00:00 2015-11-05 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1446678000) at position 8 (0): Unexpected character' in /in/rvZtb:4 Stack trace: #0 /in/rvZtb(4): DateTime->__construct('1446678000') #1 {main} thrown in /in/rvZtb on line 4
Process exited with code 255.