3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testsize = 1000*100; $bucketcount = 16; $buckets = array(); // Initialize buckets for ($i = 0; $i < $bucketcount; $i++) { $buckets[$i] = 0; } // Run the test for ($i = 0; $i < $testsize; $i++) { $n = ord(openssl_random_pseudo_bytes(1)); $buckets[$n % $bucketcount]++; // Here is our modulo operation } echo "Expected in each bucket: " . ($testsize / $bucketcount) . "\n"; print_r($buckets);

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.3.60.0150.00316.63
8.3.50.0110.00921.20
8.3.40.0090.00618.63
8.3.30.0110.00419.04
8.3.20.0040.00420.20
8.3.10.0080.00021.73
8.3.00.0060.00317.75
8.2.180.0130.00325.92
8.2.170.0170.00018.95
8.2.160.0070.01422.96
8.2.150.0040.00425.66
8.2.140.0080.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00419.27
8.2.110.0000.01120.39
8.2.100.0040.00817.91
8.2.90.0060.00319.08
8.2.80.0050.00317.97
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0030.00618.07
8.2.40.0030.00619.84
8.2.30.0000.00717.94
8.2.20.0030.00517.80
8.2.10.0050.00318.05
8.2.00.0060.00317.93
8.1.280.0130.00325.92
8.1.270.0080.00020.39
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00822.11
8.1.230.0070.00421.04
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0080.00018.58
8.1.160.0040.00421.93
8.1.150.0020.00520.61
8.1.140.0000.00717.44
8.1.130.0030.00317.55
8.1.120.0080.00017.45
8.1.110.0050.00317.44
8.1.100.0030.00517.28
8.1.90.0040.00417.32
8.1.80.0070.00017.31
8.1.70.0040.00417.26
8.1.60.0030.00617.52
8.1.50.0090.00017.55
8.1.40.0040.00417.56
8.1.30.0050.00317.61
8.1.20.0030.00517.66
8.1.10.0040.00417.47
8.1.00.0000.00817.46
8.0.300.0040.00418.77
8.0.290.0090.00016.75
8.0.280.0040.00418.43
8.0.270.0000.00717.19
8.0.260.0070.00317.23
8.0.250.0030.00316.95
8.0.240.0000.00616.89
8.0.230.0000.00717.01
8.0.220.0000.00716.80
8.0.210.0000.00716.71
8.0.200.0000.00616.81
8.0.190.0000.00816.88
8.0.180.0030.00616.93
8.0.170.0050.00316.97
8.0.160.0000.00916.86
8.0.150.0030.00416.87
8.0.140.0040.00416.75
8.0.130.0030.00313.30
8.0.120.0000.00816.77
8.0.110.0040.00416.83
8.0.100.0050.00216.93
8.0.90.0030.00516.78
8.0.80.0080.00616.93
8.0.70.0040.00417.00
8.0.60.0000.00716.68
8.0.50.0070.00016.94
8.0.30.0070.01216.91
8.0.20.0100.01017.40
8.0.10.0050.00217.04
8.0.00.0110.00716.68
7.4.330.0020.00215.04
7.4.320.0000.00816.46
7.4.300.0060.00016.61
7.4.290.0000.01016.51
7.4.280.0040.00416.52
7.4.270.0030.00316.62
7.4.260.0040.00416.56
7.4.250.0070.00016.60
7.4.240.0020.00516.49
7.4.230.0000.00716.57
7.4.220.0090.00916.54
7.4.210.0110.00416.57
7.4.200.0030.00316.58
7.4.160.0030.01416.65
7.4.150.0070.01117.40
7.4.140.0090.01017.86
7.4.130.0110.00816.48
7.4.120.0070.01016.56
7.4.110.0030.01316.73
7.4.100.0060.01216.39
7.4.90.0090.00916.45
7.4.80.0180.00319.39
7.4.70.0090.01316.63
7.4.60.0100.00716.33
7.4.50.0000.00816.40
7.4.40.0120.00616.45
7.4.30.0060.01016.44
7.4.00.0090.00715.15
7.3.330.0060.00013.28
7.3.320.0060.00013.33
7.3.310.0050.00216.46
7.3.300.0030.00316.38
7.3.290.0030.00316.39
7.3.280.0120.00716.42
7.3.270.0130.01317.40
7.3.260.0030.01316.55
7.3.250.0080.00916.49
7.3.240.0090.00816.36
7.3.230.0120.00816.39
7.3.210.0100.00616.40
7.3.200.0100.00719.39
7.3.190.0100.00716.50
7.3.180.0130.00716.58
7.3.170.0150.00616.37
7.3.160.0030.01316.52
7.3.120.0030.01014.88
7.3.110.0000.01514.82
7.3.100.0060.00314.60
7.3.90.0070.00414.91
7.3.80.0040.00714.85
7.3.70.0110.00414.89
7.3.60.0060.01014.55
7.3.50.0040.00414.67
7.3.40.0120.00014.86
7.3.30.0060.00614.93
7.3.20.0000.01516.70
7.3.10.0060.00516.64
7.3.00.0040.00916.68
7.2.330.0090.00916.39
7.2.320.0060.01216.61
7.2.310.0030.01416.65
7.2.300.0090.00916.52
7.2.290.0060.01616.66
7.2.240.0030.00715.23
7.2.230.0040.01114.89
7.2.220.0030.00615.13
7.2.210.0000.01414.88
7.2.200.0060.00314.99
7.2.190.0080.00414.93
7.2.180.0040.00814.75
7.2.170.0060.00614.76
7.2.160.0070.00315.04
7.2.150.0090.00316.81
7.2.140.0090.00616.88
7.2.130.0060.00716.71
7.2.120.0070.00716.83
7.2.110.0040.00816.86
7.2.100.0050.00916.75
7.2.90.0050.00816.85
7.2.80.0040.01016.75
7.2.70.0090.00516.85
7.2.60.0050.00616.96
7.2.50.0050.00916.87
7.2.40.0070.00616.92
7.2.30.0050.00816.93
7.2.20.0070.00916.76
7.2.10.0080.00316.89
7.2.00.0090.04917.58
7.1.330.0060.00615.68
7.1.320.0030.00615.68
7.1.310.0030.01015.77
7.1.300.0040.01115.78
7.1.290.0040.00815.59
7.1.280.0060.00615.71
7.1.270.0000.01415.47
7.1.260.0110.00015.79
7.1.250.0030.00815.59
7.1.70.0000.19717.47
7.1.60.0470.16719.59
7.1.50.0340.16817.02
7.1.00.0000.22722.46
7.0.200.0370.19316.87
7.0.60.0100.16320.02
7.0.50.0100.14017.95
7.0.40.0030.11020.14
7.0.30.0200.17020.24
7.0.20.0200.11020.21
7.0.10.0070.11320.19
7.0.00.0070.10020.06
5.6.280.0030.23720.93
5.6.210.0030.17020.44
5.6.200.0100.17318.17
5.6.190.0030.17720.47
5.6.180.0430.11320.63
5.6.170.0270.11020.63
5.6.160.0000.17720.41
5.6.150.0070.16018.19
5.6.140.0030.14718.24
5.6.130.0070.12018.22
5.6.120.0070.11321.04
5.6.110.0030.15721.01
5.6.100.0100.12021.05
5.6.90.0070.14320.96
5.6.80.0100.10720.43
5.5.350.0200.16720.36
5.5.340.0100.15718.00
5.5.330.0130.13020.27
5.5.320.0100.17320.19
5.5.310.0200.12320.27
5.5.300.0030.12317.98
5.5.290.0070.14317.98
5.5.280.0170.11020.71
5.5.270.0000.14320.83
5.5.260.0070.16320.90
5.5.250.0130.11320.69
5.5.240.0070.17320.15
5.4.450.0400.17719.55
5.4.440.0630.17019.57
5.4.430.0770.23019.21
5.4.420.1270.31719.25
5.4.410.0730.21319.28
5.4.400.0870.24319.23
5.4.390.1000.19718.93
5.4.380.1230.24719.04
5.4.370.0870.19019.02
5.4.360.0970.19019.01
5.4.350.1230.20719.15
5.4.340.1000.20719.12
5.4.320.0730.20719.16
5.4.310.0730.20019.26
5.4.300.0600.19318.89
5.4.290.0600.22319.12
5.4.280.0830.19019.17
5.4.270.0900.22018.90
5.4.260.1170.20719.15
5.4.250.0630.19318.89
5.4.240.0730.21318.92
5.4.230.1070.20719.17
5.4.220.0870.19319.23
5.4.210.0930.25319.06
5.4.200.0970.05016.72
5.4.190.1000.21319.18
5.4.180.0900.19019.11
5.4.170.1130.20719.21
5.4.160.0830.19718.90
5.4.150.0970.28018.92
5.4.140.1170.05316.23
5.4.130.0930.05316.56
5.4.120.0930.05316.55
5.4.110.0870.05016.20
5.4.100.0930.06716.32
5.4.90.0700.07016.53
5.4.80.0800.05316.33
5.4.70.0900.04316.35
5.4.60.0770.05316.39
5.4.50.0800.05016.09
5.4.40.1070.04016.38
5.4.30.0700.06016.09
5.4.20.0900.05716.48
5.4.10.0770.05316.31
5.4.00.0870.04715.66
5.3.290.0800.05314.70
5.3.280.0770.05014.47
5.3.270.0830.06714.49
5.3.260.0900.06314.59
5.3.250.0870.06014.62
5.3.240.0730.05014.46
5.3.230.0730.06014.52
5.3.220.0630.05314.60
5.3.210.0800.05714.50
5.3.200.1030.06014.50
5.3.190.1070.06314.41
5.3.180.1200.05314.44
5.3.170.0670.05314.39
5.3.160.0900.05314.47
5.3.150.1070.06714.35
5.3.140.0630.07314.39
5.3.130.0700.06314.34
5.3.120.1030.07314.38
5.3.110.0970.06014.48
5.3.100.1070.05313.82
5.3.90.0870.06313.96
5.3.80.1130.04313.81
5.3.70.1070.06713.95
5.3.60.0900.04713.92
5.3.50.0670.07013.80
5.3.40.0930.05313.90
5.3.30.0600.06013.74
5.3.20.0800.04713.58
5.3.10.0670.05313.50
5.3.00.1030.06313.48
5.2.170.0530.04711.24
5.2.160.0930.05311.14
5.2.150.0730.04311.24
5.2.140.0870.04711.04
5.2.130.0870.03711.02
5.2.120.0800.04711.05
5.2.110.0570.05010.93
5.2.100.0700.04711.02
5.2.90.0630.04711.04
5.2.80.0730.05011.04
5.2.70.0830.04011.19
5.2.60.0600.03311.09
5.2.50.0630.04010.88
5.2.40.0600.03711.00
5.2.30.0570.04711.02
5.2.20.0700.04011.00
5.2.10.0400.04010.83
5.2.00.0430.04710.79
5.1.60.0470.0409.93
5.1.50.0270.05710.07
5.1.40.0430.04310.05
5.1.30.0570.03710.23
5.1.20.0430.04010.20
5.1.10.0530.0409.96
5.1.00.0430.0479.96
5.0.50.0270.0308.63
5.0.40.0330.0238.45
5.0.30.0300.0478.22
5.0.20.0330.0278.11
5.0.10.0300.0338.15
5.0.00.0270.0538.20
4.4.90.0400.0275.83
4.4.80.0270.0305.84
4.4.70.0270.0205.73
4.4.60.0370.0205.81
4.4.50.0370.0275.80
4.4.40.0170.0405.85
4.4.30.0200.0275.80
4.4.20.0200.0235.91
4.4.10.0270.0175.82
4.4.00.0200.0375.93
4.3.110.0230.0305.79
4.3.100.0100.0275.69
4.3.90.0300.0235.65
4.3.80.0370.0375.69
4.3.70.0230.0235.75
4.3.60.0270.0205.73
4.3.50.0300.0335.79
4.3.40.0300.0375.64
4.3.30.0200.0275.19
4.3.20.0200.0175.19
4.3.10.0130.0275.19
4.3.00.0030.0237.82

preferences:
38.3 ms | 401 KiB | 5 Q