3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $eventdate = '11/30/-1'; $eventdate = new DateTime($eventdate); echo $eventdate->format('Y-m-d H:i:s');
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (11/30/-1) at position 5 (/): Unexpected character in /in/iA3or:4 Stack trace: #0 /in/iA3or(4): DateTime->__construct('11/30/-1') #1 {main} thrown in /in/iA3or on line 4
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (11/30/-1) at position 5 (/): Unexpected character' in /in/iA3or:4 Stack trace: #0 /in/iA3or(4): DateTime->__construct('11/30/-1') #1 {main} thrown in /in/iA3or on line 4
Process exited with code 255.