3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = mktime(1, 10, 5, 1, 1, 1973); var_dump($start); for($dt=$start, $f=0;$f<7;$f++){ $dt->add(new DateInterval("P1D")); var_dump($dt); ?>
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected end of file in /in/GDaY9 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected $end in /in/GDaY9 on line 8
Process exited with code 255.

preferences:
172.45 ms | 1399 KiB | 45 Q