3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testsize = 1000*100; $bucketcount = 17; $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.0150.00321.21
8.3.40.0110.00319.02
8.3.30.0140.00019.08
8.3.20.0040.00420.16
8.3.10.0040.00423.49
8.3.00.0090.00017.36
8.2.180.0090.00616.75
8.2.170.0140.00022.96
8.2.160.0100.00320.39
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00321.12
8.2.110.0040.00421.04
8.2.100.0000.01217.91
8.2.90.0050.00319.21
8.2.80.0050.00317.97
8.2.70.0000.00817.48
8.2.60.0040.00418.04
8.2.50.0030.00618.07
8.2.40.0000.00919.89
8.2.30.0040.00417.96
8.2.20.0070.00017.68
8.2.10.0040.00418.06
8.2.00.0040.00417.93
8.1.280.0060.01225.92
8.1.270.0040.00420.38
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00323.85
8.1.230.0080.00420.77
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0000.00817.12
8.1.180.0040.00418.10
8.1.170.0000.01018.66
8.1.160.0000.00821.88
8.1.150.0050.00320.48
8.1.140.0070.00017.39
8.1.130.0080.00017.54
8.1.120.0000.00717.41
8.1.110.0040.00417.44
8.1.100.0050.00317.39
8.1.90.0040.00417.39
8.1.80.0040.00417.26
8.1.70.0030.00317.30
8.1.60.0050.00317.42
8.1.50.0050.00217.57
8.1.40.0050.00317.50
8.1.30.0030.00617.70
8.1.20.0040.00417.59
8.1.10.0000.00817.62
8.1.00.0040.00417.55
8.0.300.0020.00518.77
8.0.290.0030.00616.75
8.0.280.0000.00718.30
8.0.270.0070.00016.81
8.0.260.0030.00517.10
8.0.250.0060.00016.86
8.0.240.0000.00716.86
8.0.230.0070.00016.89
8.0.220.0000.00816.89
8.0.210.0040.00416.91
8.0.200.0030.00316.94
8.0.190.0080.00016.97
8.0.180.0040.00416.93
8.0.170.0040.00416.93
8.0.160.0000.00816.76
8.0.150.0040.00416.82
8.0.140.0000.00816.86
8.0.130.0060.00013.36
8.0.120.0060.00316.84
8.0.110.0040.00416.93
8.0.100.0040.00416.92
8.0.90.0050.00316.72
8.0.80.0090.00616.85
8.0.70.0040.00416.76
8.0.60.0070.00016.95
8.0.50.0040.00416.93
8.0.30.0090.01017.07
8.0.20.0120.01017.40
8.0.10.0040.00416.88
8.0.00.0110.00716.70
7.4.330.0000.00515.04
7.4.320.0000.00616.55
7.4.300.0030.00316.51
7.4.290.0000.00916.62
7.4.280.0000.00816.52
7.4.270.0000.00716.60
7.4.260.0040.00416.52
7.4.250.0060.00316.61
7.4.240.0020.00516.51
7.4.230.0070.00016.36
7.4.220.0060.01116.62
7.4.210.0110.00316.44
7.4.200.0070.00016.61
7.4.160.0070.00716.50
7.4.150.0090.00917.40
7.4.140.0070.01117.86
7.4.130.0150.00916.41
7.4.120.0140.00516.48
7.4.110.0180.00016.71
7.4.100.0030.02116.47
7.4.90.0090.00916.52
7.4.80.0160.00719.39
7.4.70.0090.01216.57
7.4.60.0100.00716.59
7.4.50.0030.00516.46
7.4.40.0000.02016.54
7.4.30.0100.00716.47
7.4.00.0030.00915.05
7.3.330.0050.00313.27
7.3.320.0030.00213.15
7.3.310.0000.00716.44
7.3.300.0000.00716.42
7.3.290.0050.00916.35
7.3.280.0080.00816.41
7.3.270.0150.01017.40
7.3.260.0130.00316.48
7.3.240.0070.01016.38
7.3.230.0060.01216.49
7.3.210.0070.01016.46
7.3.200.0120.00419.39
7.3.190.0070.01016.45
7.3.180.0100.00716.55
7.3.170.0090.00916.51
7.3.160.0110.00816.62
7.3.10.0100.00316.20
7.3.00.0040.00716.65
7.2.330.0070.01016.63
7.2.320.0140.00316.68
7.2.310.0060.01316.54
7.2.300.0030.01716.57
7.2.290.0080.01216.53
7.2.130.0150.00016.86
7.2.120.0060.00616.86
7.2.110.0070.01016.87
7.2.100.0000.01816.86
7.2.90.0040.01116.62
7.2.80.0040.00916.66
7.2.70.0000.01416.88
7.2.60.0030.01316.82
7.2.50.0060.01017.02
7.2.40.0090.00616.68
7.2.30.0030.01416.91
7.2.20.0030.00716.98
7.2.10.0040.01116.83
7.2.00.0330.09118.07
7.1.250.0030.01015.76
7.1.70.0030.16117.06
7.1.60.0500.20519.59
7.1.50.0430.13617.12
7.1.00.0030.23322.36
7.0.200.0300.19016.86
7.0.60.0070.12019.97
7.0.50.0070.11017.91
7.0.40.0200.13020.30
7.0.30.0270.14720.19
7.0.20.0170.11720.23
7.0.10.0100.14720.25
7.0.00.0170.14020.38
5.6.280.0070.25321.00
5.6.210.0200.16020.72
5.6.200.0070.18018.28
5.6.190.0100.18720.73
5.6.180.0500.14720.61
5.6.170.0230.17720.77
5.6.160.0030.12320.39
5.6.150.0030.13318.24
5.6.140.0100.15018.36
5.6.130.0070.12018.13
5.6.120.0030.11321.09
5.6.110.0030.12721.09
5.6.100.0100.11021.14
5.6.90.0100.14321.05
5.6.80.0070.11020.43
5.5.350.0200.16320.46
5.5.340.0070.11018.04
5.5.330.0070.16720.14
5.5.320.0100.13720.41
5.5.310.0330.13720.23
5.5.300.0030.15018.04
5.5.290.0070.18018.01
5.5.280.0070.16720.97
5.5.270.0070.16320.86
5.5.260.0200.16020.79
5.5.250.0070.17320.58
5.5.240.0100.16320.27
5.4.450.0500.20719.55
5.4.440.0670.18719.63
5.4.430.0900.29019.39
5.4.420.1070.20319.49
5.4.410.0970.26719.14
5.4.400.1070.17718.93
5.4.390.0700.19019.18
5.4.380.0700.21718.92
5.4.370.1030.23019.09
5.4.360.1170.19319.18
5.4.350.0700.18318.94
5.4.340.0900.19718.94
5.4.320.0630.20719.12
5.4.310.0970.27719.18
5.4.300.1000.21019.18
5.4.290.1000.22319.23
5.4.280.0070.20019.17
5.4.270.0170.19319.20
5.4.260.0800.18719.16
5.4.250.1130.18319.11
5.4.240.1030.19719.14
5.4.230.1100.21719.26
5.4.220.0830.21319.18
5.4.210.0130.30319.12
5.4.200.0830.06716.92
5.4.190.1330.24319.16
5.4.180.0930.18719.12
5.4.170.1370.19018.97
5.4.160.0100.19718.91
5.4.150.0770.20318.99
5.4.140.0830.05016.34
5.4.130.0770.07016.52
5.4.120.0930.06716.42
5.4.110.1000.05316.22
5.4.100.1000.05316.46
5.4.90.0900.07716.55
5.4.80.0630.06716.40
5.4.70.0970.06316.32
5.4.60.1300.05316.47
5.4.50.1270.06716.48
5.4.40.1330.06316.30
5.4.30.1400.05016.38
5.4.20.1130.07716.50
5.4.10.1600.06316.50
5.4.00.1030.06715.98
5.3.290.1400.06014.50
5.3.280.1200.05014.62
5.3.270.1370.07314.61
5.3.260.0970.06314.64
5.3.250.0970.05014.48
5.3.240.1130.05014.62
5.3.230.1270.06714.54
5.3.220.0900.05314.59
5.3.210.1070.04314.45
5.3.200.0970.06314.39
5.3.190.1070.08014.44
5.3.180.0700.07714.39
5.3.170.0930.07014.40
5.3.160.0730.07314.45
5.3.150.1130.04714.56
5.3.140.1030.06014.48
5.3.130.1100.07014.46
5.3.120.1030.06014.57
5.3.110.1000.06014.43
5.3.100.1130.06014.04
5.3.90.1170.05014.05
5.3.80.1070.05013.85
5.3.70.1200.07313.85
5.3.60.0830.06313.95
5.3.50.1230.06313.80
5.3.40.1170.06013.89
5.3.30.1130.04713.94
5.3.20.1000.07713.58
5.3.10.1030.05013.49
5.3.00.0930.05713.50
5.2.170.0900.05710.99
5.2.160.0870.05711.04
5.2.150.0600.04711.14
5.2.140.0830.04710.93
5.2.130.0800.04710.93
5.2.120.1000.05011.00
5.2.110.1100.06011.04
5.2.100.0830.05311.02
5.2.90.0830.05010.93
5.2.80.0770.03311.00
5.2.70.0730.04010.89
5.2.60.0570.04711.13
5.2.50.0770.05011.06
5.2.40.0600.04710.91
5.2.30.0570.05310.87
5.2.20.0630.03310.80
5.2.10.0670.04710.84
5.2.00.0700.05310.66
5.1.60.0670.0379.87
5.1.50.0800.0409.92
5.1.40.1030.0409.90
5.1.30.0830.04010.36
5.1.20.0630.04710.32
5.1.10.0670.0409.99
5.1.00.0730.04010.15
5.0.50.0330.0408.44
5.0.40.0300.0338.39
5.0.30.0370.0508.16
5.0.20.0470.0308.30
5.0.10.0300.0378.23
5.0.00.0400.0478.19
4.4.90.0330.0335.74
4.4.80.0300.0305.85
4.4.70.0430.0305.83
4.4.60.0400.0305.85
4.4.50.0300.0275.78
4.4.40.0270.0375.73
4.4.30.0270.0305.90
4.4.20.0530.0275.83
4.4.10.0270.0335.79
4.4.00.0330.0435.93
4.3.110.0370.0275.80
4.3.100.0300.0275.79
4.3.90.0200.0305.64
4.3.80.0470.0405.68
4.3.70.0400.0305.75
4.3.60.0470.0275.73
4.3.50.0300.0305.77
4.3.40.0370.0475.69
4.3.30.0200.0174.41
4.3.20.0100.0234.51
4.3.10.0070.0274.45
4.3.00.0130.0207.82

preferences:
63.43 ms | 401 KiB | 5 Q