3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_a = range(0, 1000000); $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $_a[$i] = $_a[$i]; } echo microtime(true) - $ts; echo /*------------------*/ $ts = microtime(true); $a = range(0, 1000000); for($i = 0; $i < count($a); $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo /*------------------*/ $ts = microtime(true); $a = range(0, 1000000); for($i = 0, $c = count($a); $i < $c; $i++) { $a[$i] = $a[$i]; } echo microtime(true) - $ts; echo /*------------------*/
Output for 5.4.0 - 5.4.14
Parse error: syntax error, unexpected end of file in /in/mVoKS on line 36
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected $end in /in/mVoKS on line 36
Process exited with code 255.