3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL & ~E_NOTICE); function f($n){for($x=$n;$x;$y++){for(;$n*$n<$x*$x+$y*$y;$x--);$c+=$x;}return$c*4+1;} $n=1001;$s=microtime(1);$v=f($n);$t=microtime(1)-$s; printf("f(%d)=%d\ntime=%f seconds.\n",$n,$v,$t);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.16 ms | 1394 KiB | 12 Q