3v4l.org

run code in 300+ PHP versions simultaneously
<?php $loopCount = 1e6; $min = 0; $max = mt_getrandmax()*2; $res = [ 'odd' => 0, 'even'=> 0, ]; while ($loopCount--) { $v = rand($min, $max); $v%2 ? $res['odd']++ : $res['even']++; } var_dump($res);

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.2.60.0100.08617.50
7.4.330.0100.08416.52
7.0.330.0100.11117.06
5.6.400.0100.15530.84
5.6.310.0060.16816.52

preferences:
24.61 ms | 403 KiB | 5 Q