3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dateRange = '2012-10-01 - '2014-01-20'; $parts = explode(' - ', $dateRange); $begin = new \DateTime($parts[0]); $end = new \DateTime($parts[1]); $interval = new \DateInterval('P1D'); $datePeriod = new \DatePeriod($begin, $interval, $end); echo $datePeriod->start->format('c');
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '2014' (T_LNUMBER) in /in/dq1jS on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_LNUMBER in /in/dq1jS on line 2
Process exited with code 255.