3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = time(); echo "Midnight of $d\n"; $date = new DateTime($d); echo $date;
based on d2n0J
Output for 7.0.0 - 7.2.0
Midnight of 1450283176 Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1450283176) at position 7 (1): Unexpected character in /in/l25eA:4 Stack trace: #0 /in/l25eA(4): DateTime->__construct('1450283176') #1 {main} thrown in /in/l25eA on line 4
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Midnight of 1450283176 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1450283176) at position 7 (1): Unexpected character' in /in/l25eA:4 Stack trace: #0 /in/l25eA(4): DateTime->__construct('1450283176') #1 {main} thrown in /in/l25eA on line 4
Process exited with code 255.