3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '24/12/2013'; $date = DateTime::createFromFormat('d/m/Y', $str); $date->format('Y-m-d'); // => 2013-12-24 print($date)
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected end of file in /in/q6iOS on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/q6iOS on line 7
Process exited with code 255.

preferences:
194.08 ms | 1395 KiB | 63 Q