3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('aa'=>10, 'bb'=>2, 'cc'=>5); $b = array('aa'=>1, 'bb'=>20, 'dd'=>11); $c = array('aa'=>3); $d = array('ee'=>5); $arr = [$a,$b,$c,$d]; $keys = array_keys(array_merge($a,$b,$c,$d)); Foreach($keys as $key){ $sums[$key] = array_sum(array_column($arr, $key)); } Var_dump($sums);

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.4.120.0090.01224.29
8.4.110.0060.00522.33
8.4.100.0040.01218.60
8.4.90.0120.00918.89
8.4.80.0120.00320.52
8.4.70.0140.00718.04
8.4.60.0150.00518.47
8.4.50.0100.01018.67
8.4.40.0070.01317.66
8.4.30.0160.00317.55
8.4.20.0150.00619.16
8.4.10.0090.00019.40
8.3.250.0130.00518.80
8.3.240.0150.00517.27
8.3.230.0120.00816.79
8.3.220.0050.00218.94
8.3.210.0090.00618.16
8.3.200.0050.00316.39
8.3.190.0110.00816.89
8.3.180.0100.00916.94
8.3.170.0070.00419.05
8.3.160.0150.00317.05
8.3.150.0100.01017.15
8.3.140.0070.01116.44
8.3.130.0040.00416.59
8.3.120.0070.00718.97
8.3.110.0040.00418.22
8.3.100.0030.00620.29
8.3.90.0100.00716.38
8.3.80.0030.00718.16
8.3.70.0150.00016.50
8.3.60.0110.00718.30
8.3.50.0090.00617.25
8.3.40.0080.00818.53
8.3.30.0120.00418.62
8.3.20.0040.00420.15
8.3.10.0080.00023.42
8.3.00.0040.00419.26
8.2.290.0120.00520.61
8.2.280.0060.00418.38
8.2.270.0130.00716.84
8.2.260.0120.00318.69
8.2.250.0100.01016.71
8.2.240.0030.00617.44
8.2.230.0090.00620.94
8.2.220.0040.00424.06
8.2.210.0070.00726.77
8.2.200.0040.00418.29
8.2.190.0070.00716.58
8.2.180.0210.00018.43
8.2.170.0090.00622.96
8.2.160.0100.00320.26
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00420.50
8.2.110.0060.01321.13
8.2.100.0110.00018.22
8.2.90.0060.00319.25
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0050.00318.16
8.2.50.0000.00818.10
8.2.40.0050.00320.42
8.2.30.0040.00419.28
8.2.20.0000.00818.18
8.2.10.0000.00718.14
8.2.00.0040.00418.20
8.1.330.0140.00521.98
8.1.320.0140.00517.79
8.1.310.0140.00416.90
8.1.300.0140.00416.91
8.1.290.0060.00318.88
8.1.280.0110.00425.92
8.1.270.0040.00420.24
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00622.77
8.1.230.0030.00720.34
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0030.00617.47
8.1.190.0000.00817.23
8.1.180.0000.00718.10
8.1.170.0040.00418.62
8.1.160.0000.00818.81
8.1.150.0000.00918.96
8.1.140.0050.00317.75
8.1.130.0070.00019.02
8.1.120.0050.00217.39
8.1.110.0050.00317.36
8.1.100.0030.00317.40
8.1.90.0050.00317.54
8.1.80.0070.00017.45
8.1.70.0000.00717.37
8.1.60.0050.00517.48
8.1.50.0070.00417.46
8.1.40.0000.00917.47
8.1.30.0030.00617.66
8.1.20.0070.00517.61
8.1.10.0060.00517.59
8.1.00.0040.00417.47
8.0.300.0070.00018.77
8.0.290.0080.00016.63
8.0.280.0040.00418.46
8.0.270.0070.00017.19
8.0.260.0080.00018.88
8.0.250.0030.00516.98
8.0.240.0030.00516.99
8.0.230.0050.00316.86
8.0.220.0030.00616.95
8.0.210.0080.00016.86
8.0.200.0060.00016.94
8.0.190.0000.00716.84
8.0.180.0050.00616.75
8.0.170.0070.00316.62
8.0.160.0070.00516.47
8.0.150.0100.00616.60
8.0.140.0070.00716.80
8.0.130.0080.00515.08
8.0.120.0070.00616.54
8.0.110.0070.00716.67
8.0.100.0080.00516.78
8.0.90.0050.00916.65
8.0.80.0090.00716.79
8.0.70.0070.00616.60
8.0.60.0050.00716.89
8.0.50.0120.00116.76
8.0.30.0110.00717.03
8.0.20.0140.00817.27
8.0.10.0090.00216.86
8.0.00.0090.00716.79
7.4.330.0020.00215.55
7.4.320.0000.00616.50
7.4.300.0000.00616.66
7.4.290.0050.00416.47
7.4.280.0110.00516.29
7.4.270.0100.00416.26
7.4.260.0100.00516.19
7.4.250.0090.00216.31
7.4.240.0150.00016.35
7.4.230.0090.00216.25
7.4.220.0100.00316.46
7.4.210.0150.00316.35
7.4.200.0080.00716.46
7.4.190.0130.00816.16
7.4.180.0180.00016.47
7.4.160.0100.00816.46
7.4.150.0070.01016.87
7.4.140.0130.00517.52
7.4.130.0140.00316.20
7.4.120.0100.00916.49
7.4.110.0100.00716.27
7.4.100.0120.00816.50
7.4.90.0140.00516.36
7.4.80.0150.00517.78
7.4.70.0110.00816.36
7.4.60.0130.00316.20
7.4.50.0060.01216.26
7.4.40.0130.00616.09
7.4.30.0140.00316.13
7.4.20.0110.00715.81
7.4.10.0100.00815.63
7.4.00.0080.00915.36
7.3.330.0120.00314.73
7.3.320.0110.00214.69
7.3.310.0060.00716.30
7.3.300.0110.00216.32
7.3.290.0050.01216.28
7.3.280.0130.00516.26
7.3.270.0160.00216.85
7.3.260.0110.00916.40
7.3.250.0130.00616.42
7.3.240.0100.00816.29
7.3.230.0100.00816.33
7.3.220.0230.00716.35
7.3.210.0120.00716.23
7.3.200.0150.00716.38
7.3.190.0130.00516.34
7.3.180.0160.00516.17
7.3.170.0150.00316.23
7.3.160.0170.00416.27
7.3.150.0150.00316.09
7.3.140.0190.00016.32
7.3.130.0100.01015.58
7.3.120.0150.00315.47
7.3.110.0110.00715.30
7.3.100.0120.00415.53
7.3.90.0140.00315.78
7.3.80.0110.00515.47
7.3.70.0130.00515.64
7.3.60.0110.00515.40
7.3.50.0060.00815.55
7.3.40.0090.00615.42
7.3.30.0130.00215.71
7.3.20.0130.00417.49
7.3.10.0110.00417.40
7.3.00.0100.00517.36
7.2.340.0150.00416.21
7.2.330.0110.00716.50
7.2.320.0140.01116.57
7.2.310.0120.00716.66
7.2.300.0140.00416.44
7.2.290.0140.00416.44
7.2.280.0150.00416.29
7.2.270.0130.00616.34
7.2.260.0110.00515.73
7.2.250.0130.00515.82
7.2.240.0110.00615.61
7.2.230.0090.00715.53
7.2.220.0090.00415.56
7.2.210.0100.00715.61
7.2.200.0070.00915.81
7.2.190.0100.00815.83
7.2.180.0080.00915.82
7.2.170.0090.00615.64
7.2.160.0080.00715.70
7.2.150.0090.00817.47
7.2.140.0090.00817.47
7.2.130.0090.00717.63
7.2.120.0110.00817.72
7.2.110.0090.00917.77
7.2.100.0110.00417.73
7.2.90.0110.00817.69
7.2.80.0080.00817.37
7.2.70.0100.00517.63
7.2.60.0090.00417.42
7.2.50.0080.00917.50
7.2.40.0120.00417.56
7.2.30.0080.00817.73
7.2.20.0100.00717.65
7.2.10.0120.00717.83
7.2.00.0090.00917.79
7.1.330.0060.01116.56
7.1.320.0120.00116.66
7.1.310.0090.00816.62
7.1.300.0100.00516.51
7.1.290.0100.00516.59
7.1.280.0110.00516.40
7.1.270.0100.00316.64
7.1.260.0110.00416.47
7.1.250.0110.00416.28
7.1.240.0140.00216.37
7.1.230.0100.00816.68
7.1.220.0110.00416.64
7.1.210.0120.00116.36
7.1.200.0070.00716.29
7.1.190.0050.01016.63
7.1.180.0090.00516.50
7.1.170.0080.00716.33
7.1.160.0080.00516.34
7.1.150.0060.00916.47
7.1.140.0070.00816.50
7.1.130.0110.00816.70
7.1.120.0260.00716.56
7.1.110.0110.00516.21
7.1.100.0090.00816.94
7.1.90.0120.00516.33
7.1.80.0110.01016.39
7.1.70.0080.00716.21
7.1.60.0250.01022.10
7.1.50.0140.00721.95
7.1.40.0130.00622.40
7.1.30.0150.00821.94
7.1.20.0160.00521.93
7.1.10.0100.00715.93
7.1.00.0090.00615.89
7.0.330.0100.00316.09
7.0.320.0080.00716.19
7.0.310.0090.00716.09
7.0.300.0100.00516.09
7.0.290.0100.00316.08
7.0.280.0040.01316.15
7.0.270.0040.00916.24
7.0.260.0100.00516.13
7.0.250.0150.00216.29
7.0.240.0160.00516.37
7.0.230.0100.00516.19
7.0.220.0140.00416.24
7.0.210.0080.00616.19
7.0.200.0110.00416.16
7.0.190.0120.00416.33
7.0.180.0090.00616.23
7.0.170.0130.00116.36
7.0.160.0100.00516.22
7.0.150.0090.00416.20
7.0.140.0120.00416.15
7.0.130.0100.00416.25
7.0.120.0080.01016.28
7.0.110.0090.00716.20
7.0.100.0100.00516.06
7.0.90.0070.00716.06
7.0.80.0130.00116.04
7.0.70.0100.00616.24
7.0.60.0090.00816.12
7.0.50.0120.00316.02
7.0.40.0070.00515.24
7.0.30.0130.00015.30
7.0.20.0070.00815.13
7.0.10.0080.00515.18
7.0.00.0120.00315.29
5.6.400.0070.00715.00
5.6.390.0100.00715.11
5.6.380.0130.00315.16
5.6.370.0060.00914.99
5.6.360.0090.00714.92
5.6.350.0110.00315.08
5.6.340.0090.00615.17
5.6.330.0080.00715.08
5.6.320.0120.00415.05
5.6.310.0060.00814.95
5.6.300.0120.00315.12
5.6.290.0090.00515.05
5.6.280.0140.00315.05
5.6.270.0120.00514.99
5.6.260.0070.00715.02
5.6.250.0090.00315.00
5.6.240.0080.00614.95
5.6.230.0130.00315.11
5.6.220.0100.00315.00
5.6.210.0080.00815.26
5.6.200.0080.00615.18
5.6.190.0080.00615.12
5.6.180.0130.00215.06
5.6.170.0110.00315.10
5.6.160.0070.00915.22
5.6.150.0100.00715.26
5.6.140.0120.00615.15
5.6.130.0100.00715.28
5.6.120.0060.00915.31
5.6.110.0070.01015.01
5.6.100.0110.00215.27
5.6.90.0100.00515.14
5.6.80.0090.00615.04
5.6.70.0100.00615.06
5.6.60.0070.00815.01
5.6.50.0110.00414.80
5.6.40.0120.00315.04
5.6.30.0130.00415.02
5.6.20.0130.00214.88
5.6.10.0080.00714.94
5.6.00.0110.00514.90

preferences:
27.97 ms | 403 KiB | 5 Q