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.0080.00616.38
8.3.50.0100.00821.95
8.3.40.0110.00418.70
8.3.30.0070.01018.96
8.3.20.0070.00020.41
8.3.10.0050.00520.48
8.3.00.0040.00419.26
8.2.180.0100.00316.38
8.2.170.0110.00722.96
8.2.160.0100.01020.39
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00920.82
8.2.110.0060.00320.54
8.2.100.0060.00617.91
8.2.90.0030.00618.22
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00817.79
8.2.50.0080.00018.07
8.2.40.0000.00717.91
8.2.30.0040.00419.45
8.2.20.0050.00217.75
8.2.10.0040.00418.01
8.2.00.0040.00417.82
8.1.280.0140.00325.92
8.1.270.0090.00022.01
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0000.00922.22
8.1.230.0080.00320.88
8.1.220.0000.00917.74
8.1.210.0000.00918.89
8.1.200.0030.00617.36
8.1.190.0080.00017.13
8.1.180.0050.00318.10
8.1.170.0040.00718.25
8.1.160.0000.00722.00
8.1.150.0040.00418.79
8.1.140.0040.00417.45
8.1.130.0030.00317.77
8.1.120.0000.00717.29
8.1.110.0000.00817.28
8.1.100.0000.00817.30
8.1.90.0030.00317.26
8.1.80.0000.00717.36
8.1.70.0000.00717.24
8.1.60.0040.00417.51
8.1.50.0080.00017.33
8.1.40.0030.00617.43
8.1.30.0000.00817.41
8.1.20.0030.00617.47
8.1.10.0040.00417.39
8.1.00.0000.00817.48
8.0.300.0000.00820.04
8.0.290.0000.00816.75
8.0.280.0000.00718.44
8.0.270.0000.00717.13
8.0.260.0000.00617.26
8.0.250.0000.00716.94
8.0.240.0000.00716.85
8.0.230.0030.00316.84
8.0.220.0030.00316.86
8.0.210.0070.00016.89
8.0.200.0000.00816.96
8.0.190.0040.00416.97
8.0.180.0000.00716.91
8.0.170.0050.00316.97
8.0.160.0000.00716.91
8.0.150.0070.00016.83
8.0.140.0000.00816.85
8.0.130.0000.00513.28
8.0.120.0000.00816.78
8.0.110.0050.00316.79
8.0.100.0040.00416.69
8.0.90.0000.00716.80
8.0.80.0080.00816.92
8.0.70.0030.00516.87
8.0.60.0040.00416.77
8.0.50.0040.00416.96
8.0.30.0160.00717.08
8.0.20.0110.00917.40
8.0.10.0040.00416.79
8.0.00.0110.00816.84
7.4.330.0030.00315.00
7.4.320.0030.00316.52
7.4.300.0000.00616.54
7.4.290.0040.00416.50
7.4.280.0080.00016.53
7.4.270.0000.00716.45
7.4.260.0040.00416.45
7.4.250.0050.00216.33
7.4.240.0020.00516.52
7.4.230.0050.00316.44
7.4.220.0030.01416.46
7.4.210.0070.00716.55
7.4.200.0030.00316.64
7.4.160.0080.00816.52
7.4.150.0060.01117.40
7.4.140.0070.01017.86
7.4.130.0060.01116.54
7.4.120.0050.01316.52
7.4.110.0030.01316.31
7.4.100.0100.00716.46
7.4.90.0070.01016.43
7.4.80.0100.01019.39
7.4.70.0090.00616.50
7.4.60.0130.00316.45
7.4.50.0040.00416.46
7.4.40.0070.01416.25
7.4.30.0060.00916.47
7.4.00.0000.01414.82
7.3.330.0000.00613.21
7.3.320.0020.00213.11
7.3.310.0000.00816.16
7.3.300.0030.00316.11
7.3.290.0070.01316.23
7.3.280.0090.01016.21
7.3.270.0130.00617.40
7.3.260.0070.01116.45
7.3.250.0120.00716.41
7.3.240.0080.00816.37
7.3.230.0060.01216.39
7.3.210.0100.01016.24
7.3.200.0100.01319.39
7.3.190.0080.00816.32
7.3.180.0130.00316.44
7.3.170.0100.00716.48
7.3.160.0120.00416.52
7.3.10.0000.01016.65
7.3.00.0040.00816.66
7.2.330.0100.00716.25
7.2.320.0090.00916.64
7.2.310.0060.01216.54
7.2.300.0100.00716.55
7.2.290.0070.01016.44
7.2.130.0030.00916.79
7.2.120.0090.00316.67
7.2.110.0100.00016.53
7.2.100.0070.01016.88
7.2.90.0100.00716.67
7.2.80.0090.00616.79
7.2.70.0030.01416.85
7.2.60.0030.00616.89
7.2.50.0070.00316.70
7.2.40.0060.01016.63
7.2.30.0070.00716.76
7.2.20.0030.01016.81
7.2.10.0130.00016.88
7.2.00.0030.01218.08
7.1.250.0000.01015.70
7.1.240.0060.00615.47
7.1.230.0070.00715.60
7.1.220.0030.00715.80
7.1.210.0030.01015.77
7.1.200.0000.01515.61
7.1.190.0070.01015.44
7.1.180.0060.00615.64
7.1.170.0040.01115.64
7.1.160.0130.00015.74
7.1.150.0040.00715.76
7.1.140.0060.00615.82
7.1.130.0040.01115.77
7.1.120.0040.00415.62
7.1.110.0030.00615.57
7.1.100.0030.00716.73
7.1.90.0110.00015.92
7.1.80.0030.00715.47
7.1.70.0010.00916.34
7.1.60.0080.00516.37
7.1.50.0060.00616.43
7.1.40.0030.00915.63
7.1.30.0060.00915.45
7.1.20.0080.00015.88
7.1.10.0060.00915.62
7.1.00.0070.04019.16
7.0.330.0120.00315.49
7.0.320.0030.01015.21
7.0.310.0030.01015.22
7.0.300.0110.00315.37
7.0.290.0030.00715.32
7.0.280.0030.00715.11
7.0.270.0060.00615.32
7.0.260.0060.00915.44
7.0.250.0060.00315.13
7.0.240.0060.00615.42
7.0.230.0070.00714.98
7.0.220.0100.00015.23
7.0.210.0030.00615.34
7.0.200.0060.00916.03
7.0.190.0030.00715.43
7.0.180.0000.01315.39
7.0.170.0060.00315.45
7.0.160.0070.00715.23
7.0.150.0030.00915.27
7.0.140.0020.04418.75
7.0.130.0070.01015.57
7.0.120.0040.01115.53
7.0.110.0040.00715.25
7.0.100.0000.01215.32
7.0.90.0090.00315.36
7.0.80.0000.01015.50
7.0.70.0000.01015.18
7.0.60.0050.03517.61
7.0.50.0080.04316.65
7.0.40.0070.04816.73
7.0.30.0250.02316.76
7.0.20.0160.03616.65
7.0.10.0180.04516.85
7.0.00.0030.05216.75
5.6.380.0040.00714.11
5.6.370.0000.01014.42
5.6.360.0060.00314.34
5.6.350.0080.00414.42
5.6.340.0100.00314.39
5.6.330.0060.00614.07
5.6.320.0060.00913.86
5.6.310.0040.01114.22
5.6.300.0040.01114.12
5.6.290.0120.00613.95
5.6.280.0100.03517.71
5.6.270.0030.00614.23
5.6.260.0060.00614.14
5.6.250.0060.00614.34
5.6.240.0030.01014.08
5.6.230.0000.01014.17
5.6.220.0100.00313.97
5.6.210.0100.04217.33
5.6.200.0070.04716.24
5.6.190.0030.02717.41
5.6.180.1880.03117.32
5.6.170.0200.02717.36
5.6.160.0100.03917.36
5.6.150.0020.02716.24
5.6.140.0070.02916.25
5.6.130.0030.04216.26
5.6.120.0060.04717.63
5.6.110.0050.04717.63
5.6.100.0030.02917.60
5.6.90.0070.03317.68
5.6.80.0070.02017.21
5.6.70.0110.03317.29
5.6.60.0040.00714.32
5.6.50.0040.00814.12
5.6.40.0130.00014.21
5.6.30.0040.00814.27
5.6.20.0000.01314.09
5.6.10.0000.01014.45
5.6.00.0030.00914.27
5.5.380.0000.00611.23
5.5.370.0030.00511.06
5.5.360.0090.00011.03
5.5.350.0150.04015.52
5.5.340.0030.03014.47
5.5.330.0070.02015.81
5.5.320.0120.02515.68
5.5.310.0080.04315.71
5.5.300.0060.02014.63
5.5.290.0060.02014.55
5.5.280.0030.02415.94
5.5.270.0030.03615.94
5.5.260.0080.03115.94
5.5.250.0160.03615.89
5.5.240.0050.04115.64
5.5.230.0000.01010.98
5.5.220.0040.00411.17
5.5.210.0000.00811.12
5.5.200.0030.00911.13
5.5.190.0060.00310.87
5.5.180.0030.00611.18
5.5.170.0060.00311.29
5.5.160.0040.00410.82
5.5.150.0000.00710.88
5.5.140.0070.00411.26
5.5.130.0030.00311.30
5.5.120.0060.00610.96
5.5.110.0000.01111.02
5.5.100.0070.00710.82
5.5.90.0030.00610.98
5.5.80.0070.00310.96
5.5.70.0040.00411.23
5.5.60.0030.00311.07
5.5.50.0090.00011.20
5.5.40.0000.01111.16
5.5.30.0030.00311.25
5.5.20.0030.00310.67
5.5.10.0000.01010.91
5.5.00.0050.00211.17
5.4.450.0520.02715.33
5.4.440.0450.03515.29
5.4.430.0420.03315.35
5.4.420.0050.03415.17
5.4.410.0080.02914.99
5.4.400.0730.02714.99
5.4.390.0360.03014.84
5.4.380.0180.02914.72
5.4.370.0230.02114.81
5.4.360.0180.03014.83
5.4.350.0220.03014.67
5.4.340.0100.03314.93
5.4.330.0030.00310.82
5.4.320.0040.02211.63
5.4.310.0070.02611.74
5.4.300.0080.01911.56
5.4.290.0060.02611.72
5.4.280.0070.03311.61
5.4.270.0070.02211.65
5.4.260.0070.02711.76
5.4.250.0080.02711.71
5.4.240.0050.02711.78
5.4.230.0040.02211.72
5.4.220.0060.02111.67
5.4.210.0090.02311.53
5.4.200.0070.02511.56
5.4.190.0080.02111.80
5.4.180.0070.02111.71
5.4.170.0040.02711.82
5.4.160.0040.02511.67
5.4.150.0040.02111.71
5.4.140.0040.02211.54
5.4.130.0040.02211.41
5.4.120.0050.02211.43
5.4.110.0050.01911.71
5.4.100.0060.02411.56
5.4.90.0070.02911.38
5.4.80.0080.02011.64
5.4.70.0050.01911.60
5.4.60.0060.02711.45
5.4.50.0050.02111.40
5.4.40.0040.02011.47
5.4.30.0040.02211.49
5.4.20.0090.02011.44
5.4.10.0090.02411.38
5.4.00.0030.02511.10
5.3.290.0050.02211.60
5.3.280.0060.02111.53
5.3.270.0040.02511.67
5.3.260.0040.02411.61
5.3.250.0040.02211.69
5.3.240.0040.02211.47
5.3.230.0030.02311.66
5.3.220.0050.02611.44
5.3.210.0060.02511.57
5.3.200.0050.02811.57
5.3.190.0050.03211.60
5.3.180.0040.02311.70
5.3.170.0080.03011.58
5.3.160.0100.01811.63
5.3.150.0040.02411.66
5.3.140.0040.02611.62
5.3.130.0060.02111.58
5.3.120.0070.02211.63
5.3.110.0070.02111.45
5.3.100.0080.01911.35
5.3.90.0040.02511.21
5.3.80.0070.02011.25
5.3.70.0070.01911.13
5.3.60.0060.01811.33
5.3.50.0070.01911.14
5.3.40.0080.02511.14
5.3.30.0060.01811.19
5.3.20.0060.02011.18
5.3.10.0080.02311.05
5.3.00.0030.02211.01
5.2.170.0050.0189.39
5.2.160.0030.0199.40
5.2.150.0020.0199.44
5.2.140.0060.0159.25
5.2.130.0040.0159.33
5.2.120.0070.0139.40
5.2.110.0040.0219.36
5.2.100.0040.0169.39
5.2.90.0030.0169.31
5.2.80.0060.0169.32
5.2.70.0040.0189.32
5.2.60.0030.0189.20
5.2.50.0040.0199.27
5.2.40.0080.0179.17
5.2.30.0030.0199.27
5.2.20.0040.0199.07
5.2.10.0030.0199.13
5.2.00.0020.0219.08
5.1.60.0030.0178.37
5.1.50.0050.0168.27
5.1.40.0070.0128.32
5.1.30.0070.0138.43
5.1.20.0030.0168.41
5.1.10.0010.0188.27
5.1.00.0030.0158.33
5.0.50.0050.0117.50
5.0.40.0030.0127.43
5.0.30.0040.0177.34
5.0.20.0010.0147.32
5.0.10.0020.0127.31
5.0.00.0020.0207.31
4.4.90.0030.0106.57
4.4.80.0040.0086.56
4.4.70.0020.0116.56
4.4.60.0040.0076.56
4.4.50.0020.0116.57
4.4.40.0040.0156.54
4.4.30.0030.0086.56
4.4.20.0030.0096.60
4.4.10.0030.0106.61
4.4.00.0020.0166.56
4.3.110.0020.0106.52
4.3.100.0010.0116.51
4.3.90.0030.0106.50
4.3.80.0020.0186.47
4.3.70.0020.0116.49
4.3.60.0040.0096.49
4.3.50.0010.0126.49
4.3.40.0030.0136.45
4.3.30.0010.0105.84
4.3.20.0020.0105.82
4.3.10.0030.0115.80
4.3.00.0050.0137.68

preferences:
48.13 ms | 401 KiB | 5 Q