3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); $b = 1000; $array = range(1000, 1); $i = $b; $s1 = microtime(true); while($i--) $a = array_shift(array_slice($array, 0, 1)); } $s2 = microtime(true); echo $s2 - $s1; $s3 = microtime(true); $i = $b; while($i--) { $a = reset($array); } $s4 = microtime(true); echo '<br />'; echo $s4 - $s3;
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '}' in /in/mrnC7 on line 13
Process exited with code 255.

preferences:
196.47 ms | 1395 KiB | 66 Q