3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new DateTime('23/09/2018'))->format('Y-m-d');
based on XVE0C
Output for 7.0.28 - 7.3.0rc3
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (23/09/2018) at position 0 (2): Unexpected character in /in/DD9W4:3 Stack trace: #0 /in/DD9W4(3): DateTime->__construct('23/09/2018') #1 {main} thrown in /in/DD9W4 on line 3
Process exited with code 255.
Output for 5.6.38
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (23/09/2018) at position 0 (2): Unexpected character' in /in/DD9W4:3 Stack trace: #0 /in/DD9W4(3): DateTime->__construct('23/09/2018') #1 {main} thrown in /in/DD9W4 on line 3
Process exited with code 255.