3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test_alter(&$item1, $key, $prefix) { $item1 = "$prefix: $item1"; } function test_print($item2, $key) { echo "$$key = '$item2';\n"; } echo "Before ...:\n"; array_walk($fruits, 'test_print'); ?>

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.0040.01116.48
8.3.50.0090.00722.02
8.3.40.0070.00718.57
8.3.30.0110.00719.18
8.3.20.0040.00420.16
8.3.10.0050.00320.53
8.3.00.0060.00319.38
8.2.180.0040.01116.37
8.2.170.0150.00022.96
8.2.160.0030.01020.35
8.2.150.0060.00324.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0030.00621.09
8.2.110.0030.00620.31
8.2.100.0070.00418.21
8.2.90.0050.00219.23
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0000.00917.93
8.2.50.0030.00518.07
8.2.40.0080.00018.34
8.2.30.0000.00819.44
8.2.20.0040.00417.74
8.2.10.0070.00018.00
8.2.00.0040.00417.76
8.1.280.0070.00725.92
8.1.270.0040.00422.14
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.17
8.1.230.0040.00817.64
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0000.01017.12
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0040.00718.39
8.1.160.0040.00421.90
8.1.150.0000.00718.69
8.1.140.0000.00717.39
8.1.130.0000.00817.87
8.1.120.0030.00317.24
8.1.110.0070.00017.38
8.1.100.0070.00017.43
8.1.90.0040.00417.29
8.1.80.0040.00317.35
8.1.70.0030.00317.34
8.1.60.0060.00317.48
8.1.50.0040.00417.47
8.1.40.0080.00017.46
8.1.30.0030.00517.47
8.1.20.0050.00217.63
8.1.10.0060.00317.38
8.1.00.0030.00517.46
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0070.00018.55
8.0.270.0070.00017.13
8.0.260.0000.00617.20
8.0.250.0030.00416.97
8.0.240.0030.00317.00
8.0.230.0040.00416.91
8.0.220.0020.00516.92
8.0.210.0000.00716.88
8.0.200.0050.00316.99
8.0.190.0040.00417.02
8.0.180.0070.00016.88
8.0.170.0030.00516.91
8.0.160.0030.00516.92
8.0.150.0070.00016.80
8.0.140.0030.00416.82
8.0.130.0060.00013.25
8.0.120.0040.00416.77
8.0.110.0000.00716.79
8.0.100.0030.00516.84
8.0.90.0050.00216.91
8.0.80.0060.00916.90
8.0.70.0050.00316.78
8.0.60.0050.00316.88
8.0.50.0040.00416.93
8.0.30.0120.00617.05
8.0.20.0090.00917.40
8.0.10.0030.00316.84
8.0.00.0170.00116.78
7.4.330.0070.00015.00
7.4.320.0060.00016.52
7.4.300.0000.00616.54
7.4.290.0040.00416.43
7.4.280.0060.00316.44
7.4.270.0070.00016.57
7.4.260.0070.00016.50
7.4.250.0040.00416.43
7.4.240.0020.00516.48
7.4.230.0020.00516.29
7.4.220.0080.01216.46
7.4.210.0030.01416.43
7.4.200.0070.00016.28
7.4.160.0110.00416.59
7.4.150.0100.01017.40
7.4.140.0130.00417.86
7.4.130.0110.00516.50
7.4.120.0170.00316.38
7.4.110.0060.01616.48
7.4.100.0130.00316.51
7.4.90.0090.00916.41
7.4.80.0170.00419.39
7.4.70.0110.00416.49
7.4.60.0120.00816.41
7.4.50.0040.00416.34
7.4.40.0050.01016.40
7.4.30.0130.00316.35
7.4.00.0040.01114.86
7.3.330.0020.00213.11
7.3.320.0000.00513.09
7.3.310.0070.00016.28
7.3.300.0000.00616.25
7.3.290.0070.01116.25
7.3.280.0100.00616.18
7.3.270.0070.01017.40
7.3.260.0080.01116.27
7.3.250.0120.00816.24
7.3.240.0130.01016.31
7.3.230.0140.00316.61
7.3.210.0090.00916.59
7.3.200.0120.00619.39
7.3.190.0100.01316.47
7.3.180.0100.00716.52
7.3.170.0070.01416.48
7.3.160.0150.00716.26
7.2.330.0130.00616.57
7.2.320.0100.01316.61
7.2.310.0060.01616.53
7.2.300.0070.01016.30
7.2.290.0070.01016.35
7.1.70.0030.01016.88
7.1.60.0190.00319.61
7.1.50.0230.01134.67
7.1.00.0000.08022.27
7.0.200.0000.00716.80
7.0.140.0030.06722.04
7.0.70.4130.04019.83
7.0.60.0030.08319.86
7.0.50.0070.07017.93
7.0.40.0170.03020.23
7.0.30.0200.03720.07
7.0.20.0300.07020.20
7.0.10.0200.03720.26
7.0.00.0130.08320.16
5.6.210.0070.03720.74
5.6.200.0100.07718.16
5.6.190.0100.07320.51
5.6.180.0000.05020.46
5.6.170.0430.06720.48
5.6.160.0100.07020.62
5.6.150.0030.05718.16
5.6.140.0030.08718.14
5.6.130.0070.08718.18
5.6.120.0100.06320.98
5.6.110.0030.09020.86
5.6.100.0030.07321.05
5.6.90.0030.04321.01
5.6.80.0030.08720.38
5.6.70.0300.07020.50
5.5.350.0030.07720.46
5.5.340.0030.08017.95
5.5.330.0100.08020.19
5.5.320.0030.05720.37
5.5.310.0200.05320.28
5.5.300.0070.05717.99
5.5.290.0070.08717.95
5.5.280.0170.06720.80
5.5.270.0030.05020.77
5.5.260.0030.04020.98
5.5.250.0130.05320.71
5.5.240.0030.04320.19
5.4.450.2230.04019.46
5.4.440.2500.04319.55
5.4.430.2470.03719.30
5.4.420.2470.04319.52
5.4.410.2530.04019.02
5.4.400.2530.05019.23
5.4.390.2530.03319.22
5.4.380.2400.03719.14
5.4.370.2400.04319.06
5.4.360.2300.04019.20
5.4.350.2470.04019.21
5.4.340.2230.04019.17
5.4.320.2430.04018.87
5.4.310.2430.03719.08
5.4.300.2330.04019.19
5.4.290.2270.03319.00
5.4.280.2500.03318.98
5.4.270.2200.04019.21
5.4.260.2470.04018.99
5.4.250.2430.04719.05
5.4.240.2530.04719.07
5.4.230.2470.03719.16
5.4.220.2470.04318.87
5.4.210.2570.03719.08
5.4.200.2700.03319.10
5.4.190.2400.03719.08
5.4.180.2300.03719.15
5.4.170.2530.04719.23
5.4.160.2530.04319.33
5.4.150.2370.03719.20
5.4.140.2600.02716.43
5.4.130.2400.03016.58
5.4.120.2370.03016.47
5.4.110.2330.03716.63
5.4.100.2300.03716.50
5.4.90.2770.04016.61
5.4.80.2400.03016.48
5.4.70.2730.04016.49
5.4.60.2470.04016.34
5.4.50.2730.04316.48
5.4.40.2000.04016.43
5.4.30.2430.03316.50
5.4.20.2430.03316.37
5.4.10.2330.03316.48
5.4.00.2930.03015.80
5.3.290.2500.04314.67
5.3.280.2670.04014.49
5.3.270.2400.04314.59
5.3.260.2270.03314.71
5.3.250.2570.03314.52
5.3.240.2270.03314.75
5.3.230.2400.04014.67
5.3.220.2530.03714.55
5.3.210.2230.03714.55
5.3.200.2570.03314.64
5.3.190.2530.04014.49
5.3.180.2470.03714.57
5.3.170.2030.03314.79
5.3.160.2530.03714.68
5.3.150.2500.03714.56
5.3.140.2430.04314.53
5.3.130.2230.03714.56
5.3.120.2430.04714.63
5.3.110.2500.04014.77
5.3.100.2430.03314.01
5.3.90.2470.04714.11
5.3.80.2600.04314.17
5.3.70.2500.04014.03
5.3.60.2270.03713.93
5.3.50.2300.03313.93
5.3.40.0030.05713.86
5.3.30.0070.05014.13
5.3.20.0000.06713.75
5.3.10.1670.05013.74
5.3.00.2370.04013.65
5.2.170.1730.03311.30
5.2.160.2100.03011.25
5.2.150.1830.03011.30
5.2.140.1970.03011.08
5.2.130.2130.02711.12
5.2.120.2070.02311.19
5.2.110.2130.03711.12
5.2.100.2000.03011.00
5.2.90.1930.02711.00
5.2.80.2130.03011.00
5.2.70.0970.03711.02
5.2.60.0100.02011.14
5.2.50.0030.03011.07
5.2.40.0030.03011.01
5.2.30.0970.03011.09
5.2.20.0900.02310.93
5.2.10.1670.04010.77
5.2.00.1530.02310.64
5.1.60.1470.03010.13
5.1.50.1300.02710.13
5.1.40.0170.02010.04
5.1.30.0170.02010.49
5.1.20.0070.02710.41
5.1.10.0100.0279.98
5.1.00.0130.0309.97
5.0.50.0030.0238.48
5.0.40.0000.0238.47
5.0.30.0070.0278.13
5.0.20.0030.0208.18
5.0.10.0070.0208.16
5.0.00.0030.0308.21
4.4.90.0070.0137.09
4.4.80.0070.0137.09
4.4.70.0070.0137.09
4.4.60.0030.0177.09
4.4.50.0030.0207.09
4.4.40.0030.0277.09
4.4.30.0070.0137.09
4.4.20.0100.0177.09
4.4.10.0070.0137.09
4.4.00.0030.0207.09
4.3.110.0030.0177.09
4.3.100.0100.0107.09
4.3.90.0070.0137.09
4.3.80.0070.0237.09
4.3.70.0070.0137.09
4.3.60.0030.0177.09
4.3.50.0070.0137.09
4.3.40.0070.0207.09
4.3.30.0000.0177.09
4.3.20.0030.0137.09
4.3.10.0000.0177.09
4.3.00.0030.0137.09

preferences:
43.73 ms | 401 KiB | 5 Q