3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php <?php ini_set('memory_limit', '-1'); $ary1 = array(); $ary2 = array(); $timeBegin = time(); for ($i = 0; $i <= 1000000; $i++) { $ary1[] = $i; } $timeEnd1 = time(); for ($i = 0; $i <= 1000000; $i++) { array_push($ary2, $i); } $timeEnd2 = time(); var_dump($timeBegin, $timeEnd1, $timeEnd2); echo 'first loop take ' . ($timeEnd1 - $timeBegin) . ' seconds' . PHP_EOL; echo 'second loop take ' . ($timeEnd2 - $timeEnd1) . ' seconds' . PHP_EOL;
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '<', expecting end of file in /in/8oKXV on line 3
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Parse error: syntax error, unexpected '<' in /in/8oKXV on line 3
Process exited with code 255.