3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=range(1,10000); function odd($elt) { return $elt & 1; } $start=microtime(true); for ($i=0;$i<100;$i++) { $b = array(); for ($j=0; $j<10000; $j++) { if ($a[$j] & 1) $b[] = $a[$j]; } } echo "time = ", microtime(true) - $start, "\n";

preferences:
29.09 ms | 402 KiB | 5 Q