3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array(); $b=null; $e=null; $l=100; $i=0; while($i++ < $l){ $b=microtime(true); $e=microtime(true); $a[] = $e - $b; } $an = (array_sum($a) / count($a))*1000; $i = 0; $a=array(); $b=null; $e=null; while($i++ < $l){ $b=microtime(true); microtime(true); microtime(true); $e=microtime(true); $a[] = e - $b; } $am = (array_sum($a) / count($a))*1000; echo "Average empty time measure: " . $an .'sec\n'; echo "Average filled time measure: " . $am .'sec\n'; echo "Average 2 microtime calls: " . ($am - $an) . 'sec'
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/4dWpi on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/4dWpi on line 27
Process exited with code 255.