3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastWeek = new \DateTime('-7 days'); $interval = new \DateInterval('P1D'); $period = new \DatePeriod(new \DateTime(), $interval, $lastWeek); var_dump(iterator_to_array($period);
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23
Parse error: syntax error, unexpected ';' in /in/nqIhW on line 5
Process exited with code 255.

preferences:
187.35 ms | 1387 KiB | 60 Q