3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a){ $c = []; foreach ($a as $b){$c[]=$b*$b;} return $c; } $a = range(1,1e6); $d = test($a); print 'done';

preferences:
65.51 ms | 402 KiB | 5 Q