3v4l.org

run code in 300+ PHP versions simultaneously
<?php $finish="a"; while($finish="a"){ $i = (mt_rand(0,999)); $counter = 0; for($j=1;$j<=$i;$j++){ //all divisible factors if(($i % $j)==0){ $counter++; } //prime requires 2 rules ( divisible by 1 and divisible by itself) if($counter==2){ print $i." is Prime <br/>"; $finish="b"; } } }

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)
7.3.10.0090.00616.51
7.3.00.0100.00716.34
7.2.130.0070.01617.02
7.2.120.0130.00916.78
7.2.110.0000.01616.94
7.2.100.0030.01616.73
7.2.90.0000.01816.56
7.2.80.0130.00616.77
7.2.70.0130.00316.51
7.2.60.0150.00416.85
7.2.50.0130.00316.85
7.2.40.0070.01016.79
7.2.30.0100.01017.07
7.2.20.0120.00416.97
7.2.10.0130.00616.79
7.2.00.0070.00817.97
7.1.250.0070.01315.38
7.1.70.0040.01117.08
7.1.60.0190.01319.40
7.1.50.0150.01517.03
7.0.200.0420.01014.94

preferences:
38.24 ms | 400 KiB | 5 Q