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.0150.00616.37
8.3.50.0030.01522.04
8.3.40.0070.00718.46
8.3.30.0070.01118.92
8.3.20.0040.00420.33
8.3.10.0050.00320.48
8.3.00.0080.00019.13
8.2.180.0070.01016.75
8.2.170.0070.00722.96
8.2.160.0140.00720.58
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.09
8.2.110.0090.00020.39
8.2.100.0110.00017.72
8.2.90.0030.00618.16
8.2.80.0040.00417.97
8.2.70.0050.00517.50
8.2.60.0080.00018.04
8.2.50.0050.00318.07
8.2.40.0050.00318.22
8.2.30.0000.00819.45
8.2.20.0040.00417.73
8.2.10.0000.00718.00
8.2.00.0040.00417.75
8.1.280.0130.00625.92
8.1.270.0080.00022.25
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.19
8.1.230.0060.00620.89
8.1.220.0000.00817.76
8.1.210.0080.00018.85
8.1.200.0040.00417.22
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0040.00418.18
8.1.160.0000.00722.00
8.1.150.0040.00418.73
8.1.140.0000.00717.42
8.1.130.0000.00717.93
8.1.120.0000.00717.41
8.1.110.0030.00517.27
8.1.100.0000.00817.36
8.1.90.0000.00717.39
8.1.80.0030.00317.38
8.1.70.0000.00817.38
8.1.60.0000.00817.41
8.1.50.0030.00517.34
8.1.40.0040.00417.44
8.1.30.0000.00817.39
8.1.20.0050.00317.50
8.1.10.0040.00417.42
8.1.00.0030.00617.43
8.0.300.0080.00020.05
8.0.290.0050.00216.62
8.0.280.0030.00318.51
8.0.270.0080.00017.26
8.0.260.0030.00317.18
8.0.250.0020.00516.95
8.0.240.0070.00016.87
8.0.230.0030.00316.94
8.0.220.0070.00016.80
8.0.210.0040.00416.80
8.0.200.0040.00416.86
8.0.190.0020.00516.94
8.0.180.0040.00416.87
8.0.170.0060.00316.97
8.0.160.0040.00416.91
8.0.150.0000.00716.82
8.0.140.0050.00316.75
8.0.130.0060.00013.35
8.0.120.0040.00416.84
8.0.110.0040.00416.75
8.0.100.0070.00016.96
8.0.90.0040.00416.85
8.0.80.0090.00616.88
8.0.70.0050.00316.91
8.0.60.0040.00416.96
8.0.50.0030.00316.72
8.0.30.0100.00917.11
8.0.20.0070.01117.40
8.0.10.0050.00216.79
8.0.00.0070.01116.79
7.4.330.0000.00615.00
7.4.320.0000.00616.48
7.4.300.0040.00416.39
7.4.290.0040.00416.43
7.4.280.0040.00416.45
7.4.270.0070.00016.39
7.4.260.0030.00316.34
7.4.250.0000.00916.51
7.4.240.0030.00316.44
7.4.230.0050.00316.53
7.4.220.0070.01116.61
7.4.210.0090.00916.41
7.4.200.0050.00216.53
7.4.160.0090.00616.54
7.4.150.0110.00717.40
7.4.140.0070.00917.86
7.4.130.0090.00816.59
7.4.120.0130.00816.52
7.4.110.0110.00516.52
7.4.100.0110.00616.53
7.4.90.0150.00316.48
7.4.80.0040.02019.39
7.4.70.0110.00416.55
7.4.60.0170.00716.43
7.4.50.0050.00316.25
7.4.40.0060.01516.39
7.4.30.0120.01016.56
7.4.00.0070.01015.09
7.3.330.0030.00313.26
7.3.320.0050.00013.10
7.3.310.0000.00716.28
7.3.300.0000.00616.09
7.3.290.0070.01416.24
7.3.280.0090.00616.30
7.3.270.0030.01417.40
7.3.260.0120.01216.33
7.3.250.0080.01016.55
7.3.240.0070.01116.35
7.3.230.0160.00416.55
7.3.210.0110.00716.48
7.3.200.0060.01019.39
7.3.190.0110.01016.33
7.3.180.0030.01416.27
7.3.170.0060.01116.32
7.3.160.0030.01316.32
7.2.330.0090.00916.23
7.2.320.0100.01016.39
7.2.310.0160.00716.54
7.2.300.0080.00816.45
7.2.290.0070.01016.52
7.2.60.0150.00316.61
7.1.200.0110.00415.82
7.1.100.0070.00717.82
7.1.70.0000.01317.04
7.1.60.0160.00019.61
7.1.50.0170.01334.66
7.1.00.0000.08022.31
7.0.200.0030.00316.84
7.0.140.0070.06721.95
7.0.60.0030.05319.96
7.0.50.0000.09017.88
7.0.40.0030.07720.27
7.0.30.0270.04320.19
7.0.20.0230.04320.09
7.0.10.0130.07720.26
7.0.00.0000.09020.23
5.6.280.0030.07321.08
5.6.210.0000.09020.51
5.6.200.0000.04318.18
5.6.190.0000.05320.48
5.6.180.0230.08720.48
5.6.170.0300.08020.56
5.6.160.0030.04320.57
5.6.150.0070.08718.17
5.6.140.0070.05018.25
5.6.130.0070.06318.27
5.6.120.0000.07321.00
5.6.110.0030.04020.96
5.6.100.0030.04321.09
5.6.90.0070.08321.09
5.6.80.0030.05720.41
5.5.350.0270.07320.40
5.5.340.0000.04318.07
5.5.330.0100.03720.38
5.5.320.0330.07720.31
5.5.310.0300.04720.31
5.5.300.0070.08018.07
5.5.290.0100.07318.03
5.5.280.0130.07720.84
5.5.270.0100.04020.80
5.5.260.0100.05020.88
5.5.250.0030.08320.79
5.5.240.4230.03320.24
5.4.450.0630.03019.18
5.4.440.0330.03719.42
5.4.430.0430.06019.23
5.4.420.0970.06019.54
5.4.410.1000.05019.11
5.4.400.0970.06019.07
5.4.390.0130.05719.22
5.4.380.0400.05318.54
5.4.370.0400.06318.72
5.4.360.0400.05718.57
5.4.350.0330.04018.83
5.4.340.0370.06718.52
5.4.320.0070.03712.50
5.4.310.0070.04112.50
5.4.300.0070.03612.50
5.4.290.0140.04612.50
5.4.280.0110.03712.40
5.4.270.0050.03712.40
5.4.260.0100.03712.40
5.4.250.0050.03912.40
5.4.240.0050.04412.40
5.4.230.0080.04712.39
5.4.220.0070.03712.39
5.4.210.0070.04112.39
5.4.200.0090.03612.39
5.4.190.0070.03712.39
5.4.180.0080.03812.39
5.4.170.0060.03812.39
5.4.160.0050.04112.39
5.4.150.0050.03812.39
5.4.140.0060.04012.07
5.4.130.0080.03312.06
5.4.120.0070.03612.02
5.4.110.0090.04312.01
5.4.100.0100.04912.02
5.4.90.0110.03612.02
5.4.80.0070.03712.01
5.4.70.0060.03512.01
5.4.60.0050.03812.01
5.4.50.0070.03612.01
5.4.40.0080.03212.00
5.4.30.0090.04212.00
5.4.20.0080.04611.99
5.4.10.0060.03911.99
5.4.00.0040.03711.48
5.3.290.0060.04012.80
5.3.280.0070.03812.71
5.3.270.0060.04112.72
5.3.260.0100.04312.71
5.3.250.0100.03312.72
5.3.240.0060.03812.72
5.3.230.0030.04212.71
5.3.220.0050.03912.68
5.3.210.0050.04112.68
5.3.200.0050.03812.68
5.3.190.0070.03712.68
5.3.180.0080.03512.67
5.3.170.0050.03912.67
5.3.160.0090.03312.68
5.3.150.0080.03412.67
5.3.140.0050.03712.66
5.3.130.0050.04212.66
5.3.120.0100.03512.66
5.3.110.0080.04012.66
5.3.100.0070.03812.12
5.3.90.0050.04312.10
5.3.80.0040.05212.10
5.3.70.0030.04012.10
5.3.60.0090.03912.08
5.3.50.0060.03712.03
5.3.40.0080.03612.03
5.3.30.0070.03511.98
5.3.20.0040.03911.77
5.3.10.0050.03511.73
5.3.00.0050.04311.72
5.2.170.0080.0409.23
5.2.160.0080.0319.22
5.2.150.0070.0299.22
5.2.140.0090.0399.22
5.2.130.0080.0389.18
5.2.120.0030.0319.18
5.2.110.0090.0289.19
5.2.100.0040.0329.18
5.2.90.0050.0309.18
5.2.80.0030.0349.18
5.2.70.0050.0309.18
5.2.60.0060.0319.13
5.2.50.0070.0319.11
5.2.40.0060.0289.08
5.2.30.0080.0289.05
5.2.20.0030.0309.03
5.2.10.0050.0278.95
5.2.00.0050.0298.81
5.1.60.0050.0328.09
5.1.50.0050.0248.09
5.1.40.0080.0208.07
5.1.30.0030.0288.42
5.1.20.0050.0278.44
5.1.10.0030.0288.17
5.1.00.0050.0258.17
5.0.50.0070.0256.64
5.0.40.0050.0196.50
5.0.30.0040.0316.32
5.0.20.0040.0196.28
5.0.10.0020.0216.27
5.0.00.0050.0306.25
4.4.90.0060.0274.78
4.4.80.0070.0134.75
4.4.70.0030.0164.75
4.4.60.0030.0164.76
4.4.50.0030.0164.77
4.4.40.0040.0314.71
4.4.30.0030.0204.76
4.4.20.0030.0164.84
4.4.10.0040.0164.85
4.4.00.0020.0274.76
4.3.110.0040.0154.67
4.3.100.0030.0174.67
4.3.90.0020.0164.63
4.3.80.0030.0244.58
4.3.70.0040.0144.63
4.3.60.0040.0134.63
4.3.50.0010.0184.62
4.3.40.0030.0294.54
4.3.30.0040.0143.30
4.3.20.0040.0203.28
4.3.10.0030.0153.25
4.3.00.0000.02314.28

preferences:
56.37 ms | 401 KiB | 5 Q