3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ReturnDates($date1, $date2) { $date1 = date_create($date1); $date2 = date_create($date2); while(date_diff($date1 < $date2)) { date_add($date, date_interval_create_from_date_string('1 day')); echo date_format($date, 'Y-m-d'); } } functionReturnDates('01-01-2012', '01-02-2012')
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected end of file in /in/lVjHf on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected $end in /in/lVjHf on line 12
Process exited with code 255.

preferences:
195.52 ms | 1395 KiB | 55 Q