3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( 0 => Array ( 0 => Array ( 0 => 'R421_FD03', 1 => 1 ), 1 => Array ( 0 => 'R421_FD03', 1 => 1 ) ), 1 => Array ( 0 => Array ( 0 => 'R421_FD03', 1 => 1 ), 1 => Array ( 0 => 'R421_FD02', 1 => 1 ) ) ); $final_array = []; foreach($array as $arr){ foreach($arr as $ar){ $final_array[$ar[0]][0] = $ar[0]; $final_array[$ar[0]][1] = (isset($final_array[$ar[0]][1])) ? $final_array[$ar[0]][1] + $ar[1] : $ar[1]; } } $final_array = array_values($final_array); print_r($final_array);

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.130.0040.00416.69
8.3.120.0060.00318.92
8.3.110.0030.00520.94
8.3.100.0040.00418.25
8.3.90.0040.00726.77
8.3.80.0090.00016.50
8.3.70.0100.01016.75
8.3.60.0110.01118.29
8.3.50.0230.00818.13
8.3.40.0110.00418.85
8.3.30.0040.01118.67
8.3.20.0000.00821.72
8.3.10.0040.00421.73
8.3.00.0050.00223.51
8.2.250.0090.00016.58
8.2.240.0040.00417.22
8.2.230.0060.00322.58
8.2.220.0000.01124.06
8.2.210.0030.00526.77
8.2.200.0090.00016.63
8.2.190.0040.01116.63
8.2.180.0070.01325.92
8.2.170.0160.00318.81
8.2.160.0140.00422.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.76
8.2.110.0060.00320.47
8.2.100.0080.00417.84
8.2.90.0000.00720.55
8.2.80.0000.00719.34
8.2.70.0000.00817.91
8.2.60.0060.00318.16
8.2.50.0000.00818.10
8.2.40.0060.00319.33
8.2.30.0040.00419.24
8.2.20.0040.00418.14
8.2.10.0000.00819.30
8.2.00.0030.00319.37
8.1.300.0080.01220.34
8.1.290.0000.01130.84
8.1.280.0170.00025.92
8.1.270.0040.00424.66
8.1.260.0090.00926.35
8.1.250.0030.00728.09
8.1.240.0090.00020.44
8.1.230.0120.00017.42
8.1.220.0050.00317.74
8.1.210.0040.00418.88
8.1.200.0030.00617.36
8.1.190.0080.00417.35
8.1.180.0000.00818.10
8.1.170.0050.00318.63
8.1.160.0050.00318.84
8.1.150.0040.00418.94
8.1.140.0030.00618.81
8.1.130.0000.00717.53
8.1.120.0070.00017.41
8.1.110.0000.01017.50
8.1.100.0000.00917.44
8.1.90.0070.00317.38
8.1.80.0000.00717.46
8.1.70.0000.00717.50
8.1.60.0040.00417.48
8.1.50.0060.00317.56
8.1.40.0040.00717.56
8.1.30.0060.00317.68
8.1.20.0040.00717.58
8.1.10.0040.00417.41
8.1.00.0080.00017.34
8.0.300.0030.00620.07
8.0.290.0040.00416.75
8.0.280.0000.00718.34
8.0.270.0070.00017.23
8.0.260.0050.00316.84
8.0.250.0000.00616.97
8.0.240.0000.00717.02
8.0.230.0070.00017.02
8.0.220.0000.00716.89
8.0.210.0000.00716.87
8.0.200.0000.00616.87
8.0.190.0000.00716.90
8.0.180.0040.00416.79
8.0.170.0000.00816.82
8.0.160.0000.00816.93
8.0.150.0000.00716.86
8.0.140.0000.00716.86
8.0.130.0000.00613.32
8.0.120.0040.00416.95
8.0.110.0040.00416.79
8.0.100.0000.00716.90
8.0.90.0070.00016.92
8.0.80.0090.00616.87
8.0.70.0070.00016.75
8.0.60.0050.00216.77
8.0.50.0000.00816.80
8.0.30.0120.01017.08
8.0.20.0090.00916.92
8.0.10.0040.00416.98
8.0.00.0130.00716.77
7.4.330.0020.00215.55
7.4.320.0000.00616.43
7.4.300.0060.00016.49
7.4.290.0040.00416.45
7.4.280.0040.00416.51
7.4.270.0000.00716.68
7.4.260.0030.00316.52
7.4.250.0070.00016.48
7.4.240.0000.00716.55
7.4.230.0040.00416.60
7.4.220.0030.00516.57
7.4.210.0040.01216.62
7.4.200.0070.00016.67
7.4.160.0100.00716.55
7.4.140.0160.00317.86
7.4.130.0060.01316.52
7.4.120.0060.01316.52
7.4.110.0060.01216.50
7.4.100.0030.01716.39
7.4.90.0090.00916.52
7.4.80.0150.00619.39
7.4.70.0030.01416.60
7.4.60.0060.01316.56
7.4.50.0090.00916.65
7.4.40.0130.00316.46
7.4.00.0110.00714.92
7.3.330.0000.00613.09
7.3.320.0050.00013.25
7.3.310.0070.00016.30
7.3.300.0030.00316.24
7.3.290.0050.00316.37
7.3.280.0140.00316.30
7.3.260.0090.01016.50
7.3.240.0120.01016.50
7.3.230.0110.00816.54
7.3.210.0130.00316.35
7.3.200.0090.00916.61
7.3.190.0120.00316.57
7.3.180.0130.00316.21
7.3.170.0070.01016.70
7.3.160.0150.00016.52
7.3.60.0030.00915.04
7.3.50.0070.00314.92
7.3.40.0070.00414.55
7.3.30.0040.00814.68
7.3.20.0060.01516.52
7.3.10.0160.00616.41
7.3.00.0110.00616.37
7.2.330.0040.01516.63
7.2.320.0160.00016.74
7.2.310.0130.00316.64
7.2.300.0060.01116.43
7.2.290.0090.01316.79
7.2.190.0100.00014.99
7.2.180.0000.01014.86
7.2.170.0090.00614.76
7.2.160.0050.00514.71
7.2.150.0100.00316.40
7.2.140.0030.00716.37
7.2.130.0040.01116.77
7.2.120.0040.00716.68
7.2.110.0000.01217.05
7.2.100.0040.00716.97
7.2.90.0090.01216.71
7.2.80.0100.00716.96
7.2.70.0060.00917.00
7.2.60.0060.01816.67
7.2.50.0100.00316.94
7.2.40.0040.00716.94
7.2.30.0130.01017.21
7.2.20.0060.00717.04
7.2.10.0040.00816.92
7.2.00.0070.00716.68
7.1.300.0030.00716.04
7.1.290.0070.00315.68
7.1.280.0030.00715.58
7.1.270.0100.00315.67
7.1.260.0100.01015.73
7.1.250.0040.00715.67

preferences:
27.87 ms | 403 KiB | 5 Q