3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iter = 10000; $array = range(0, $iter); $function = function($val, $key) {}; $t = microtime(true); for($i = 0; $i < $iter; $i++) { array_walk($array, $function); } echo 'array_walk '.($walk = microtime(true) - $t); $t = microtime(true); for($i = 0; $i < $iter; $i++) { array_map($function, $array, array_keys($array)); } echo ', array_map '.($map = microtime(true) - $t); echo ', '.(100 - $walk / $map * 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.1.70.0032.49816.88
7.1.60.0002.50119.17
7.1.50.0072.49517.21
7.1.00.0002.50022.48
7.0.200.0202.48115.30
7.0.140.0002.50022.01
7.0.60.0102.49020.33
7.0.50.0002.50018.12
7.0.40.0072.49319.93
7.0.30.0232.47719.84
7.0.20.0372.46319.95
7.0.10.0402.46019.89
7.0.00.0002.48719.87
5.6.210.0032.49722.17
5.6.200.0002.50019.63
5.6.190.0102.47021.82
5.6.180.0232.47721.91
5.6.170.0272.47321.87
5.6.160.0072.49321.75
5.6.150.0132.47019.63
5.6.140.0132.48719.53
5.6.130.0102.49019.60
5.6.120.0032.49722.50
5.6.110.0172.48322.45
5.6.100.0102.49022.41
5.6.90.0132.48722.44
5.6.80.0072.49321.85
5.6.70.4372.06321.79
5.5.350.0202.44021.90
5.5.340.0172.47322.36
5.5.330.0172.42722.35
5.5.320.0272.43322.22
5.5.310.0032.46322.37
5.5.300.0272.43022.14
5.5.290.0202.43322.34
5.5.280.0032.47022.38
5.5.270.0202.37322.32
5.5.260.0102.46022.38
5.5.250.0132.47721.95
5.5.240.0432.32721.54
5.4.450.0032.47720.88
5.4.440.0102.45720.82
5.4.430.0102.48320.82
5.4.420.0072.46320.87
5.4.410.0232.37020.83
5.4.400.0102.45020.36
5.4.390.0172.39020.68
5.4.380.0202.41720.48
5.4.370.0202.41720.47
5.4.360.0202.45020.50
5.4.350.0172.45020.52
5.4.340.0132.45720.34
5.4.320.0072.46020.30
5.4.310.0132.45020.49
5.4.300.0132.44020.66
5.4.290.0132.47320.50
5.4.280.0272.24217.16
5.4.270.0152.24017.24
5.4.260.0182.32917.15
5.4.250.0192.32017.15
5.4.240.0312.28917.05
5.4.230.0192.20216.02
5.4.220.0242.19915.97
5.4.210.0232.20915.96
5.4.200.0252.21416.00
5.4.190.0122.23516.02
5.4.180.0112.22216.04
5.4.170.0162.22416.04
5.4.160.0192.23116.04
5.4.150.0162.22415.96
5.4.140.0152.23314.95
5.4.130.0192.23014.96
5.4.120.0192.22414.94
5.4.110.0142.24214.95
5.4.100.0172.21114.95
5.4.90.0162.22314.90
5.4.80.0162.11714.94
5.4.70.0152.06014.85
5.4.60.0212.08114.94
5.4.50.0242.23814.87
5.4.40.0222.21914.91
5.4.30.0202.21814.91
5.4.20.0202.22714.83
5.4.10.0162.26514.92
5.4.00.0152.21514.34
5.3.290.0332.44015.93
5.3.280.0162.22714.63
5.3.270.0142.24214.66
5.3.260.0222.23914.66
5.3.250.0242.21914.66
5.3.240.0172.25114.64
5.3.230.0242.21514.65
5.3.220.0192.21814.61
5.3.210.0142.25914.62
5.3.200.0162.22514.63
5.3.190.0252.20614.62
5.3.180.0152.22514.63
5.3.170.0202.09614.59
5.3.160.0202.08714.60
5.3.150.0172.15314.60
5.3.140.0172.20814.59
5.3.130.0142.19314.61
5.3.120.0152.22914.58
5.3.110.0172.22114.59
5.3.100.0152.22114.07
5.3.90.0142.23114.05
5.3.80.0162.22114.03
5.3.70.0162.21814.02
5.3.60.0172.22413.97
5.3.50.0182.22713.96
5.3.40.0242.21513.98
5.3.30.0192.22413.94
5.3.20.0152.24613.70
5.3.10.0152.23513.68
5.3.00.0242.24813.67
5.2.170.0090.0399.16
5.2.160.0090.0319.16
5.2.150.0080.0359.16
5.2.140.0080.0359.16
5.2.130.0090.0319.12
5.2.120.0140.0369.12
5.2.110.0110.0359.13
5.2.100.0120.0549.12
5.2.90.0080.0429.12
5.2.80.0100.0399.12
5.2.70.0100.0329.12
5.2.60.0080.0379.07
5.2.50.0060.0379.04
5.2.40.0080.0359.02
5.2.30.0080.0418.99
5.2.20.0060.0368.98
5.2.10.0110.0338.91
5.2.00.0100.0328.77
5.1.60.0090.0298.05
5.1.50.0070.0338.05
5.1.40.0060.0338.04
5.1.30.0080.0318.38
5.1.20.0070.0338.41
5.1.10.0070.0318.13
5.1.00.0080.0298.13
5.0.50.0060.0256.61
5.0.40.0060.0236.47
5.0.30.0050.0376.28
5.0.20.0060.0256.25
5.0.10.0070.0316.23
5.0.00.0060.0386.22
4.4.90.0040.0214.78
4.4.80.0070.0184.75
4.4.70.0040.0204.75
4.4.60.0040.0184.75
4.4.50.0040.0204.77
4.4.40.0040.0314.71
4.4.30.0040.0204.76
4.4.20.0040.0204.84
4.4.10.0040.0214.85
4.4.00.0070.0284.76
4.3.110.0050.0194.67
4.3.100.0060.0184.66
4.3.90.0040.0174.64
4.3.80.0080.0364.59
4.3.70.0050.0174.63
4.3.60.0030.0194.63
4.3.50.0070.0214.63
4.3.40.0070.0264.54
4.3.30.0130.0293.28
4.3.20.0040.0213.26
4.3.10.0030.0213.23
4.3.00.0230.0206.62

preferences:
38.25 ms | 400 KiB | 5 Q