3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(1,100000); $t = microtime(true); foreach($a as $e) { $b = $e; } $t -= microtime(true); echo 'foreach time: ', $t, PHP_EOL; $t = microtime(true); array_walk($a, function($e) { $b = $e; }); $t -= microtime(true); echo 'array_walk time: ', $t, PHP_EOL; $t = microtime(true); array_map(function($e) { $b = $e; }, $a); $t -= microtime(true); echo 'Array_map time: ', $t, PHP_EOL;

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.0130.01926.18
7.3.00.0190.01526.22
7.2.130.0070.02826.61
7.2.120.0110.02526.43
7.2.110.0120.02126.88
7.2.100.0170.01726.52
7.2.90.0210.01426.55
7.2.80.0110.02226.75
7.2.70.0080.02726.84
7.2.60.0200.02526.77
7.2.50.0190.02226.43
7.2.40.0150.03026.84
7.2.30.0130.04026.59
7.2.20.0210.02126.42
7.2.10.0290.01726.73
7.2.00.0160.03326.70
7.1.250.0100.02225.79
7.1.70.0100.01726.63
7.1.60.0170.03426.85
7.1.50.0100.04526.70
7.1.00.0030.10032.37
7.0.200.0480.02020.91
7.0.140.0000.09329.95
7.0.60.0100.10325.99
7.0.50.0130.09723.77
7.0.40.0030.08025.86
7.0.30.0800.06725.91
7.0.20.0400.07025.77
7.0.10.0100.05025.64
7.0.00.0070.07025.64
5.6.280.0070.16058.66
5.6.210.0230.13358.51
5.6.200.0230.08355.92
5.6.190.0230.14358.13
5.6.180.3400.08757.99
5.6.170.0300.14058.12
5.6.160.0270.09058.15
5.6.150.0230.08755.98
5.6.140.0300.10055.90
5.6.130.0270.12755.89
5.6.120.0230.13058.90
5.6.110.0200.12358.73
5.6.100.0300.15358.89
5.6.90.0270.13758.77
5.6.80.0230.12358.29
5.6.70.2630.09358.12
5.5.350.0030.08358.14
5.5.340.0030.11755.70
5.5.330.0130.12357.98
5.5.320.0500.13357.88
5.5.310.0430.08757.95
5.5.300.0170.15355.74
5.5.290.0130.13755.68
5.5.280.0330.15058.63
5.5.270.0470.12358.52
5.5.260.0230.14358.40
5.5.250.0100.12358.54
5.5.240.0070.10757.86
5.4.450.1000.12057.25
5.4.440.1000.17757.00
5.4.430.0800.17357.20
5.4.420.1100.12757.16
5.4.410.0270.13756.70
5.4.400.0630.18056.55
5.4.390.0670.23756.50
5.4.380.0530.11356.25
5.4.370.0030.14056.43
5.4.360.0200.15056.27
5.4.350.0210.09649.77
5.4.340.0240.15149.77
5.4.320.0160.09850.25
5.4.310.0200.09050.25
5.4.300.0170.09450.25
5.4.290.0200.09250.25
5.4.280.0150.10250.15
5.4.270.0190.09150.15
5.4.260.0170.09450.14
5.4.250.0140.12250.15
5.4.240.0130.10350.15
5.4.230.0160.09750.14
5.4.220.0150.09550.13
5.4.210.0160.09350.14
5.4.200.0170.09450.14
5.4.190.0180.09250.14
5.4.180.0160.10550.13
5.4.170.0210.08850.15
5.4.160.0160.09550.14
5.4.150.0190.09150.14
5.4.140.0150.09549.82
5.4.130.0130.09849.80
5.4.120.0160.09749.77
5.4.110.0200.13249.77
5.4.100.0200.08949.76
5.4.90.0130.09749.76
5.4.80.0160.09449.77
5.4.70.0080.10249.76
5.4.60.0190.09649.76
5.4.50.0180.10449.76
5.4.40.0250.09249.75
5.4.30.0140.09849.75
5.4.20.0150.10349.74
5.4.10.0150.09749.74
5.4.00.0160.09449.23
5.3.290.0190.09449.95
5.3.280.0210.09349.88
5.3.270.0180.10249.89
5.3.260.0130.10549.89
5.3.250.0160.13849.89
5.3.240.0250.09049.89
5.3.230.0200.09149.88
5.3.220.0160.10249.85
5.3.210.0210.09749.85
5.3.200.0190.09949.85
5.3.190.0160.13549.85
5.3.180.0160.10149.85
5.3.170.0200.09249.85
5.3.160.0190.10149.85
5.3.150.0130.09949.84
5.3.140.0130.09949.84
5.3.130.0190.11249.83
5.3.120.0160.12349.84
5.3.110.0110.10649.83
5.3.100.0220.11149.32
5.3.90.0100.10649.30
5.3.80.0170.09849.29
5.3.70.0180.10149.29
5.3.60.0130.10249.27
5.3.50.0120.09749.22
5.3.40.0170.10949.23
5.3.30.0180.09449.18
5.3.20.0190.09648.96
5.3.10.0190.09448.93
5.3.00.0130.10048.91
5.2.170.0050.0309.18
5.2.160.0030.0309.19
5.2.150.0030.0329.18
5.2.140.0070.0289.18
5.2.130.0050.0299.14
5.2.120.0030.0299.14
5.2.110.0060.0269.15
5.2.100.0060.0269.14
5.2.90.0060.0429.15
5.2.80.0060.0369.14
5.2.70.0040.0299.14
5.2.60.0030.0319.09
5.2.50.0040.0309.06
5.2.40.0030.0309.04
5.2.30.0040.0319.02
5.2.20.0040.0309.01
5.2.10.0070.0248.92
5.2.00.0020.0308.79
5.1.60.0080.0208.07
5.1.50.0040.0248.07
5.1.40.0040.0258.05
5.1.30.0050.0258.40
5.1.20.0070.0238.42
5.1.10.0060.0248.15
5.1.00.0080.0328.15
5.0.50.0040.0266.63
5.0.40.0030.0196.48
5.0.30.0030.0356.29
5.0.20.0030.0206.27
5.0.10.0040.0196.25
5.0.00.0050.0326.23
4.4.90.0020.0224.78
4.4.80.0050.0134.75
4.4.70.0020.0164.76
4.4.60.0020.0194.75
4.4.50.0020.0154.77
4.4.40.0030.0244.71
4.4.30.0050.0124.76
4.4.20.0050.0134.85
4.4.10.0020.0164.84
4.4.00.0020.0324.75
4.3.110.0030.0154.67
4.3.100.0070.0104.66
4.3.90.0010.0164.63
4.3.80.0050.0294.59
4.3.70.0030.0144.63
4.3.60.0040.0224.63
4.3.50.0070.0174.63
4.3.40.0020.0244.54
4.3.30.0030.0143.29
4.3.20.0010.0163.26
4.3.10.0020.0163.22
4.3.00.0130.0237.14

preferences:
38.49 ms | 400 KiB | 5 Q