3v4l.org

run code in 500+ PHP versions simultaneously
<?php // First class callable function a() { static $c = 0; return $c++; } $c = a(...); $c = function () { static $c = 0; return $c++; }; print $c(); print $c(); $d = clone $c; print $d(); ?>

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.70.0070.00916.97
8.5.60.0120.00616.79
8.4.220.0200.00721.19
8.4.210.0080.01321.25
8.4.90.0040.00517.88
8.3.310.0100.00818.44
8.3.180.0050.00518.55
8.3.50.0060.00316.66
8.2.310.0120.00718.12

preferences:
43.58 ms | 521 KiB | 5 Q