3v4l.org

run code in 300+ PHP versions simultaneously
<?php $countedZero = 0; $totalGen = 10000; for ($i = 1; $i <= $totalGen; $i++) { $rand = random_int(-9223372036854775808, 9223372036854775807); if ($rand == 0) { $countedZero++; } } echo "0 was generated " . $countedZero . "/" . $totalGen . " times which is " . (($countedZero / $totalGen) * 100) . "%." ?>

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.2.00.0070.01618.98
7.1.70.0070.00717.14
7.1.60.0200.02019.43
7.1.50.0290.00616.70
7.1.00.0170.07322.54
7.0.200.4230.00315.04
7.0.60.0200.06319.86
7.0.50.0230.08317.66
7.0.40.0270.08720.24
7.0.30.0500.04320.13
7.0.20.0470.07020.18
7.0.10.0300.08720.18
7.0.00.0300.05020.13
5.6.280.0000.07020.77
5.6.210.0130.08020.54
5.6.200.0170.07318.12
5.6.190.0030.09020.64
5.6.180.0200.06320.49
5.6.170.0100.04720.62
5.6.160.0070.09020.61
5.6.150.0030.05718.09
5.6.140.0070.03718.07
5.6.130.0070.04718.12
5.6.120.0100.07021.00
5.6.110.0200.07721.08
5.6.100.0070.08321.00
5.6.90.0100.06721.00
5.6.80.0100.08020.40
5.5.350.3830.03020.36
5.5.340.0030.05317.91
5.5.330.0030.05320.25
5.5.320.0400.06720.18
5.5.310.0300.06320.21
5.5.300.0070.03717.95
5.5.290.0130.07018.00
5.5.280.0130.08020.76
5.5.270.0100.05020.72
5.5.260.0070.05720.86
5.5.250.0000.04320.70
5.5.240.0030.07020.00
5.4.450.0100.06719.49
5.4.440.0130.05719.55
5.4.430.0170.07019.44
5.4.420.0100.06019.59
5.4.410.0070.06318.95
5.4.400.0530.05018.86
5.4.390.0270.05319.02
5.4.380.0230.06018.77
5.4.370.0300.05018.93
5.4.360.0230.05019.04
5.4.350.0030.06019.13
5.4.340.0070.07019.29
5.4.320.0470.06019.30
5.4.310.0370.04019.02
5.4.300.0170.05319.18
5.4.290.0230.06019.02
5.4.280.0170.05319.13
5.4.270.0170.05719.27
5.4.260.0200.04719.29
5.4.250.0170.05718.74
5.4.240.0070.07018.75
5.4.230.0100.07319.22
5.4.220.0170.05719.27
5.4.210.0170.05719.08
5.4.200.0170.05318.73
5.4.190.0170.06319.01
5.4.180.0370.06018.84
5.4.170.0530.05319.22
5.4.160.0070.05319.17
5.4.150.0100.06019.00
5.4.140.0270.04016.66
5.4.130.0070.05316.28
5.4.120.0170.05716.34
5.4.110.0170.05016.50
5.4.100.0500.05716.23
5.4.90.0570.05316.46
5.4.80.0570.05016.59
5.4.70.0300.04316.54
5.4.60.0130.06316.34
5.4.50.0130.05716.50
5.4.40.0270.05016.47
5.4.30.0270.05716.51
5.4.20.0500.04316.49
5.4.10.0700.04316.41
5.4.00.0230.05015.63

preferences:
30.58 ms | 406 KiB | 6 Q