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<br />\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.0090.01216.48
8.3.50.0140.00921.91
8.3.40.0110.00418.75
8.3.30.0070.01019.10
8.3.20.0030.00520.04
8.3.10.0090.00020.42
8.3.00.0000.00819.25
8.2.180.0140.00716.38
8.2.170.0110.00422.96
8.2.160.0100.01020.50
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00720.90
8.2.110.0000.00921.11
8.2.100.0100.00017.71
8.2.90.0050.00517.91
8.2.80.0040.00418.21
8.2.70.0050.00317.63
8.2.60.0050.00317.63
8.2.50.0030.00617.61
8.2.40.0030.00519.22
8.2.30.0000.00719.35
8.2.20.0000.00717.70
8.2.10.0020.00518.13
8.2.00.0000.00717.75
8.1.280.0030.01425.92
8.1.270.0030.00522.08
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0030.00922.06
8.1.230.0040.00720.97
8.1.220.0080.00017.78
8.1.210.0030.00618.77
8.1.200.0060.00317.25
8.1.190.0030.00617.13
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0040.00421.87
8.1.150.0000.00818.79
8.1.140.0030.00517.25
8.1.130.0040.00417.73
8.1.120.0050.00317.33
8.1.110.0000.00817.27
8.1.100.0000.00717.39
8.1.90.0000.00717.38
8.1.80.0040.00417.41
8.1.70.0000.00717.30
8.1.60.0050.00317.43
8.1.50.0030.00517.53
8.1.40.0030.00517.42
8.1.30.0000.00817.47
8.1.20.0000.00817.56
8.1.10.0000.00817.55
8.1.00.0020.00517.45
8.0.300.0070.00019.86
8.0.290.0040.00416.63
8.0.280.0000.00718.44
8.0.270.0000.00717.20
8.0.260.0000.00617.26
8.0.250.0000.00716.89
8.0.240.0040.00416.95
8.0.230.0030.00316.85
8.0.220.0040.00416.81
8.0.210.0000.00716.92
8.0.200.0070.00016.93
8.0.190.0080.00016.93
8.0.180.0070.00016.91
8.0.170.0050.00316.95
8.0.160.0050.00216.89
8.0.150.0000.00716.67
8.0.140.0000.00716.89
8.0.130.0030.00313.39
8.0.120.0040.00416.82
8.0.110.0000.00716.73
8.0.100.0000.00716.89
8.0.90.0070.00016.73
8.0.80.0070.00716.91
8.0.70.0040.00416.91
8.0.60.0030.00516.81
8.0.50.0040.00416.91
8.0.30.0160.00617.27
8.0.20.0060.01217.40
8.0.10.0050.00216.88
8.0.00.0100.01016.83
7.4.330.0000.00615.00
7.4.320.0050.00216.38
7.4.300.0030.00316.45
7.4.290.0000.00716.47
7.4.280.0080.00016.45
7.4.270.0000.00716.46
7.4.260.0050.00316.52
7.4.250.0040.00416.55
7.4.240.0040.00416.50
7.4.230.0040.00416.52
7.4.220.0130.00616.38
7.4.210.0110.00316.45
7.4.200.0000.00816.64
7.4.160.0090.00916.37
7.4.150.0140.01017.40
7.4.140.0140.00417.86
7.4.130.0130.00916.35
7.4.120.0120.00916.38
7.4.110.0030.01416.71
7.4.100.0140.00816.45
7.4.90.0070.01016.50
7.4.80.0030.01919.39
7.4.70.0120.00616.51
7.4.60.0110.00616.41
7.4.50.0050.00316.62
7.4.40.0060.00916.50
7.4.30.0050.01016.45
7.4.00.0080.01014.97
7.3.330.0060.00013.30
7.3.320.0050.00013.20
7.3.310.0030.00316.21
7.3.300.0060.00016.16
7.3.290.0060.00916.27
7.3.280.0070.01116.33
7.3.270.0120.00617.40
7.3.260.0110.00616.25
7.3.250.0100.00716.45
7.3.240.0130.00316.48
7.3.230.0090.00616.57
7.3.210.0120.00616.21
7.3.200.0060.01319.39
7.3.190.0000.01816.39
7.3.180.0030.01316.34
7.3.170.0060.00916.32
7.3.160.0030.01316.30
7.3.120.0110.00714.92
7.3.110.0070.01015.04
7.3.100.0030.01414.70
7.3.90.0000.01314.84
7.3.80.0110.00414.68
7.3.70.0000.01514.77
7.3.60.0040.00814.93
7.3.50.0040.01114.58
7.3.40.0070.01014.74
7.3.30.0060.01014.71
7.3.20.0000.00916.68
7.3.10.0030.01016.25
7.3.00.0040.01216.63
7.2.330.0070.01016.59
7.2.320.0160.00416.28
7.2.310.0120.01216.31
7.2.300.0160.00616.57
7.2.290.0090.00816.51
7.2.250.0100.00314.74
7.2.240.0060.01014.70
7.2.230.0000.01414.87
7.2.220.0060.00614.79
7.2.210.0000.01215.12
7.2.200.0030.01015.02
7.2.190.0060.00615.02
7.2.180.0000.01815.08
7.2.170.0100.01015.08
7.2.00.0030.00919.21
7.1.330.0060.00615.81
7.1.320.0090.00315.98
7.1.310.0030.00915.54
7.1.300.0080.00015.76
7.1.290.0070.00715.56
7.1.280.0120.00615.71
7.1.270.0030.00615.61
7.1.260.0090.00615.62
7.1.100.0040.01218.13
7.1.70.0030.00617.02
7.1.60.0070.00719.61
7.1.50.0030.01016.65
7.1.00.0070.08722.54
7.0.200.0030.00616.75
7.0.140.0030.07322.09
7.0.60.0000.04319.82
7.0.50.0030.05717.84
7.0.40.0130.04020.23
7.0.30.0330.07020.24
7.0.20.0300.05320.23
7.0.10.0100.05020.28
7.0.00.0000.05020.10
5.6.280.0100.06721.10
5.6.210.0130.07020.70
5.6.200.0130.05318.29
5.6.190.0000.05320.41
5.6.180.0370.04020.63
5.6.170.0370.06720.71
5.6.160.0000.09720.56
5.6.150.0030.08318.15
5.6.140.0100.08018.28
5.6.130.0030.07718.18
5.6.120.0100.06020.76
5.6.110.0230.07720.96
5.6.100.0030.04321.03
5.6.90.0030.04720.98
5.6.80.0100.07720.45
5.5.350.0130.03320.33
5.5.340.0070.08317.97
5.5.330.0100.08320.42
5.5.320.0230.05720.27
5.5.310.0200.05720.32
5.5.300.0030.08718.09
5.5.290.0000.04317.93
5.5.280.0170.08320.74
5.5.270.0070.04320.89
5.5.260.0100.06720.87
5.5.250.0070.05320.48
5.5.240.0130.06720.28
5.4.450.0500.06019.43
5.4.440.0700.03319.54
5.4.430.0530.06019.44
5.4.420.0670.05019.54
5.4.410.0830.05719.50
5.4.400.0070.05719.34
5.4.390.0400.05319.30
5.4.380.0200.06318.83
5.4.370.0230.06718.73
5.4.360.0330.04318.55
5.4.350.0200.05718.57
5.4.340.0370.04018.48
5.4.320.0080.03512.51
5.4.310.0080.04112.50
5.4.300.0050.03912.51
5.4.290.0070.03712.50
5.4.280.0060.03612.40
5.4.270.0060.03612.40
5.4.260.0050.04512.39
5.4.250.0100.03612.40
5.4.240.0100.03712.40
5.4.230.0080.03712.39
5.4.220.0100.03812.39
5.4.210.0050.03712.39
5.4.200.0060.04012.39
5.4.190.0050.03912.39
5.4.180.0110.03912.39
5.4.170.0070.03612.39
5.4.160.0090.04112.39
5.4.150.0030.04012.39
5.4.140.0080.03512.07
5.4.130.0060.03812.06
5.4.120.0090.03512.02
5.4.110.0040.03712.02
5.4.100.0070.03312.01
5.4.90.0060.04312.01
5.4.80.0080.03412.02
5.4.70.0090.03112.01
5.4.60.0050.03512.00
5.4.50.0050.03512.00
5.4.40.0050.03611.99
5.4.30.0070.03411.99
5.4.20.0050.03611.99
5.4.10.0060.03311.99
5.4.00.0050.03511.48
5.3.290.0070.03812.80
5.3.280.0080.03712.71
5.3.270.0080.03812.73
5.3.260.0060.04112.72
5.3.250.0090.03512.72
5.3.240.0060.03712.72
5.3.230.0090.03512.71
5.3.220.0070.03612.68
5.3.210.0080.03912.68
5.3.200.0060.03612.68
5.3.190.0080.03512.68
5.3.180.0040.03912.67
5.3.170.0070.03612.67
5.3.160.0070.03912.68
5.3.150.0070.04012.68
5.3.140.0060.03812.66
5.3.130.0120.03312.66
5.3.120.0050.04012.66
5.3.110.0040.04012.65
5.3.100.0060.03712.12
5.3.90.0050.03812.10
5.3.80.0040.03812.10
5.3.70.0090.03512.10
5.3.60.0070.03912.08
5.3.50.0060.03812.03
5.3.40.0070.03712.03
5.3.30.0070.05111.98
5.3.20.0070.04911.77
5.3.10.0090.04611.73
5.3.00.0080.03711.72
5.2.170.0070.0329.22
5.2.160.0070.0289.22
5.2.150.0080.0289.22
5.2.140.0050.0309.22
5.2.130.0030.0329.18
5.2.120.0050.0299.18
5.2.110.0040.0309.19
5.2.100.0050.0289.19
5.2.90.0060.0289.18
5.2.80.0060.0299.18
5.2.70.0050.0299.18
5.2.60.0110.0269.14
5.2.50.0070.0319.10
5.2.40.0050.0299.08
5.2.30.0060.0289.05
5.2.20.0060.0279.03
5.2.10.0070.0268.94
5.2.00.0040.0308.81
5.1.60.0050.0238.09
5.1.50.0020.0278.09
5.1.40.0030.0258.07
5.1.30.0060.0278.42
5.1.20.0050.0258.44
5.1.10.0040.0268.17
5.1.00.0030.0338.16
5.0.50.0040.0236.64
5.0.40.0010.0226.50
5.0.30.0030.0316.32
5.0.20.0010.0226.28
5.0.10.0050.0246.26
5.0.00.0020.0346.25
4.4.90.0020.0174.78
4.4.80.0030.0154.75
4.4.70.0020.0214.75
4.4.60.0030.0154.76
4.4.50.0020.0164.77
4.4.40.0040.0244.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0050.0134.85
4.4.00.0020.0264.76
4.3.110.0030.0164.66
4.3.100.0010.0174.66
4.3.90.0020.0164.64
4.3.80.0040.0244.59
4.3.70.0050.0124.63
4.3.60.0010.0164.63
4.3.50.0040.0184.63
4.3.40.0050.0254.54
4.3.30.0030.0153.31
4.3.20.0010.0173.28
4.3.10.0030.0213.25
4.3.00.0200.01314.28

preferences:
39.25 ms | 401 KiB | 5 Q