3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = date('Y-m-d 23:59:59', 20152015); var_dump($d); new \DateTime("20152015");
based on 8sOvR
Output for 7.0.0 - 7.2.0
string(19) "1970-08-22 23:59:59" Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (20152015) at position 7 (5): Unexpected character in /in/pFZYU:5 Stack trace: #0 /in/pFZYU(5): DateTime->__construct('20152015') #1 {main} thrown in /in/pFZYU on line 5
Process exited with code 255.
Output for 5.4.0 - 5.6.28
string(19) "1970-08-22 23:59:59" Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (20152015) at position 7 (5): Unexpected character' in /in/pFZYU:5 Stack trace: #0 /in/pFZYU(5): DateTime->__construct('20152015') #1 {main} thrown in /in/pFZYU on line 5
Process exited with code 255.