3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'id' => 1, 'total' => 100, ], [ 'id' => 2, 'total' => 200, ], [ 'id' => 1, 'total' => 300, ], ]; $array2 = [ [ 'id' => 1, 'daily' => 10, ], [ 'id' => 2, 'daily' => 20, ], ]; $result = array(); foreach($array1 as $key => $value){ $result[] = $array1[$key] + $array2[$key]; } print_r($result); ?>

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.0000.01618.50
8.3.50.0110.00716.69
8.3.40.0130.00618.97
8.3.30.0140.00718.97
8.3.20.0000.00820.26
8.3.10.0040.00423.70
8.3.00.0060.00319.55
8.2.180.0070.00718.54
8.2.170.0080.00822.96
8.2.160.0130.00720.55
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00517.75
8.2.110.0100.00021.03
8.2.100.0030.00917.88
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0000.00819.45
8.2.30.0070.00319.96
8.2.20.0060.00317.80
8.2.10.0040.00418.11
8.2.00.0000.00818.08
8.1.280.0030.01725.92
8.1.270.0120.00320.37
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0110.00019.71
8.1.230.0060.00617.42
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.21
8.1.180.0050.00318.10
8.1.170.0060.00318.65
8.1.160.0080.00322.07
8.1.150.0040.00418.88
8.1.140.0000.00817.45
8.1.130.0000.00717.61
8.1.120.0050.00317.35
8.1.110.0000.00717.35
8.1.100.0070.00017.34
8.1.90.0040.00417.46
8.1.80.0040.00417.46
8.1.70.0070.00017.50
8.1.60.0080.00017.65
8.1.50.0030.00517.50
8.1.40.0020.00517.34
8.1.30.0060.00617.58
8.1.20.0030.00617.58
8.1.10.0030.00617.56
8.1.00.0000.00817.55
8.0.300.0050.00318.77
8.0.290.0000.00716.88
8.0.280.0070.00018.42
8.0.270.0070.00017.20
8.0.260.0050.00517.26
8.0.250.0030.00517.03
8.0.240.0030.00316.98
8.0.230.0070.00316.91
8.0.220.0030.00316.93
8.0.210.0000.00716.98
8.0.200.0000.00717.03
8.0.190.0040.00417.09
8.0.180.0070.00316.97
8.0.170.0060.00316.92
8.0.160.0040.00416.93
8.0.150.0070.00416.85
8.0.140.0040.00416.86
8.0.130.0060.00013.32
8.0.120.0050.00316.89
8.0.110.0000.00816.97
8.0.100.0000.00816.80
8.0.90.0000.00816.99
8.0.80.0060.00916.93
8.0.70.0040.00416.99
8.0.60.0040.00416.94
8.0.50.0050.00316.96
8.0.30.0080.01217.12
8.0.20.0100.01317.40
8.0.10.0040.00416.94
8.0.00.0120.00616.88
7.4.330.0050.00015.09
7.4.320.0000.00616.45
7.4.300.0000.00716.64
7.4.290.0040.00416.59
7.4.280.0070.00316.51
7.4.270.0030.00316.52
7.4.260.0080.00416.42
7.4.250.0040.00416.45
7.4.240.0040.00416.46
7.4.230.0000.00816.60
7.4.220.0090.00916.62
7.4.210.0120.00616.61
7.4.200.0070.00016.63
7.4.160.0100.01016.36
7.4.150.0060.01217.40
7.4.140.0100.01217.86
7.4.130.0080.00916.44
7.4.120.0070.01116.65
7.4.110.0130.00616.54
7.4.100.0110.00716.59
7.4.90.0120.00316.33
7.4.80.0060.01219.39
7.4.70.0140.01116.54
7.4.60.0090.00616.46
7.4.50.0040.00016.63
7.4.40.0060.01016.54
7.4.30.0190.00416.66
7.4.00.0060.00915.06
7.3.330.0030.00313.07
7.3.320.0040.00413.11
7.3.310.0030.00316.38
7.3.300.0040.00416.21
7.3.290.0050.00916.33
7.3.280.0080.01016.31
7.3.270.0070.01017.40
7.3.260.0160.00816.35
7.3.250.0080.01116.47
7.3.240.0190.00316.52
7.3.230.0110.00816.54
7.3.210.0140.00816.35
7.3.200.0060.01216.60
7.3.190.0130.00316.30
7.3.180.0090.00616.48
7.3.170.0100.00716.35
7.3.160.0030.01516.37
7.3.120.0070.01014.75
7.3.110.0040.01514.75
7.3.100.0070.00714.95
7.3.90.0080.00814.79
7.3.80.0040.01114.94
7.3.70.0130.00315.00
7.3.60.0040.01114.93
7.3.50.0000.01714.84
7.3.40.0100.00614.96
7.3.30.0100.00714.93
7.3.20.0070.00716.71
7.3.10.0150.00016.93
7.3.00.0040.00716.81
7.2.330.0130.00316.41
7.2.320.0130.00616.48
7.2.310.0050.01216.44
7.2.300.0060.00916.42
7.2.290.0070.01316.68
7.2.250.0130.00715.23
7.2.240.0030.01714.99
7.2.230.0130.00614.96
7.2.220.0040.00815.30
7.2.210.0000.01614.89
7.2.200.0030.01215.19
7.2.190.0090.00914.94
7.2.180.0060.00915.25
7.2.170.0030.01014.80
7.2.60.0000.01516.54
7.2.00.0040.01119.11
7.1.330.0000.01215.77
7.1.320.0040.00815.77
7.1.310.0030.01015.89
7.1.300.0030.01115.85
7.1.290.0030.00815.68
7.1.280.0080.00415.98
7.1.270.0030.01015.85
7.1.260.0110.00415.79
7.1.200.0080.00415.99
7.1.100.0000.01518.29
7.1.70.0120.00316.82
7.1.60.0140.01119.17
7.1.50.0070.01116.99
7.1.00.0130.06722.47
7.0.200.0030.00316.80
7.0.60.0100.08719.88
7.0.50.0130.06717.88
7.0.40.0100.08719.98
7.0.30.0570.06720.01
7.0.20.0230.04720.13
7.0.10.0000.04720.20
7.0.00.0030.05320.12
5.6.280.0030.03720.88
5.6.210.0070.06020.69
5.6.200.0100.07718.11
5.6.190.0030.05720.43
5.6.180.2970.04020.77
5.6.170.0230.09020.38
5.6.160.0070.07020.46
5.6.150.0100.06718.09
5.6.140.0130.07318.18
5.6.130.0000.07018.07
5.6.120.0070.07321.11
5.6.110.0100.05020.89
5.6.100.0030.08720.98
5.6.90.0170.07320.96
5.6.80.0100.03320.48
5.6.70.3800.03720.42
5.5.350.0000.08020.43
5.5.340.0000.04317.98
5.5.330.0130.06720.36
5.5.320.0170.04020.17
5.5.310.0230.07720.28
5.5.300.0100.07718.02
5.5.290.0070.06717.91
5.5.280.0100.06020.87
5.5.270.0000.06020.68
5.5.260.0130.07320.79
5.5.250.0200.07320.61
5.5.240.0270.06720.28
5.4.450.0870.05019.45
5.4.440.0800.05318.98
5.4.430.0900.05019.44
5.4.420.0670.06319.16
5.4.410.0670.06019.32
5.4.400.0830.05319.13
5.4.390.0770.06319.12
5.4.380.0800.04719.11
5.4.370.0830.04318.64
5.4.360.0930.05718.71
5.4.350.0870.04719.12
5.4.340.0770.05719.03
5.4.320.0700.05718.91
5.4.310.0830.06018.64
5.4.300.0900.04318.91
5.4.290.0930.04718.66
5.4.280.0770.05719.10
5.4.270.0800.06019.12
5.4.260.0900.06019.09
5.4.250.1000.05319.09
5.4.240.1070.04018.65
5.4.230.0930.05019.06
5.4.220.0970.04718.64
5.4.210.0970.07318.88
5.4.200.0830.05719.09
5.4.190.0770.05018.93
5.4.180.0900.06318.87
5.4.170.1000.04718.94
5.4.160.0970.06318.92
5.4.150.0730.06018.66
5.4.140.0730.06016.30
5.4.130.0930.04716.32
5.4.120.0830.07016.28
5.4.110.1000.07716.18
5.4.100.0870.05316.21
5.4.90.1030.05316.43
5.4.80.0770.04716.36
5.4.70.0170.05716.29
5.4.60.0300.06716.45
5.4.50.0000.04016.39
5.4.40.0330.03716.36
5.4.30.0030.06716.36
5.4.20.0300.06716.32

preferences:
42.35 ms | 400 KiB | 5 Q