3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fibonnacci = function (int $n, $previous2 = 0, $previous1 = 1) { if ($n <= 1) { return $previous2 + $previous1; } $closure = Closure::getCurrent(); return $closure($n - 1, $previous1, $previous1 + $previous2); }; print $fibonnacci(4);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.80.0110.00818.54
8.5.70.0150.00518.57
8.4.230.0050.00919.61
8.4.220.0110.00519.58
8.4.90.0040.00619.86
8.3.320.0070.00320.14
8.3.180.0040.00516.77
8.3.50.0090.00316.76
8.2.320.0070.00318.04

preferences:
42.63 ms | 522 KiB | 5 Q