3v4l.org

run code in 300+ PHP versions simultaneously
<?php $st = microtime(true); $x=array("x"=>1, "y"=>2); $y = array("y"=>3, "z"=>4); for ($i=1; $i<=500000; $i++) { $y + $x; } echo 'TIME:' . (microtime(true) - $st) . '<br/>'; $st = microtime(true); $x=array("x"=>1, "y"=>2); $y = array("y"=>3, "z"=>4); for ($i=1; $i<=500000; $i++) { array_merge($x, $y); } echo 'TIME:' . (microtime(true) - $st) . '<br/>';

preferences:
32.92 ms | 402 KiB | 5 Q