3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = ["101","206", "206"]; $arr2 = ["PA701", "PA700", "PA700"]; $arr3 = ["2022-04-01", "2022-04-07", "2022-04-07"]; $arr4 = [70, 1040, 1625]; foreach ($arr1 as $i => $value) { $compositeKey = "{$value}_{$arr2[$i]}_{$arr3[$i]}"; if (!isset($res1[$compositeKey])) { $res1[$compositeKey] = $value; $res2[$compositeKey] = $arr2[$i]; $res3[$compositeKey] = $arr3[$i]; $res4[$compositeKey] = $arr4[$i]; } else { $res4[$compositeKey] += $arr4[$i]; } } var_export(array_values($res1)); var_export(array_values($res2)); var_export(array_values($res3)); var_export(array_values($res4));

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.0130.00524.03
8.4.110.0090.01018.04
8.4.100.0110.00918.88
8.4.90.0120.00820.68
8.4.80.0120.00917.88
8.4.70.0030.00517.87
8.4.60.0120.00818.81
8.4.50.0110.00518.93
8.4.40.0100.00719.66
8.4.30.0100.00720.55
8.4.20.0130.00717.68
8.4.10.0040.00422.18
8.3.250.0130.00616.53
8.3.240.0090.00917.11
8.3.230.0110.00916.51
8.3.220.0070.00821.07
8.3.210.0090.01216.79
8.3.200.0050.00416.56
8.3.190.0080.01017.13
8.3.180.0110.00816.59
8.3.170.0060.00316.58
8.3.160.0100.01016.45
8.3.150.0130.00717.03
8.3.140.0150.00417.03
8.3.130.0030.00616.87
8.3.120.0030.00718.93
8.3.110.0200.00020.94
8.3.100.0030.00724.06
8.3.90.0090.00926.77
8.3.80.0090.00016.63
8.3.70.0170.00316.63
8.3.60.0150.00318.18
8.3.50.0070.00720.25
8.3.40.0070.01518.63
8.3.30.0110.00319.11
8.3.20.0040.00424.18
8.3.10.0090.00924.66
8.3.00.0000.00826.16
8.2.290.0140.00420.79
8.2.280.0070.00220.00
8.2.270.0110.00417.30
8.2.260.0070.00716.73
8.2.250.0050.00316.73
8.2.240.0050.00518.74
8.2.230.0040.00422.58
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0090.00016.63
8.2.190.0090.00616.58
8.2.180.0120.00625.92
8.2.170.0140.00018.76
8.2.160.0090.00922.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0040.00420.79
8.2.110.0000.01821.07
8.2.100.0030.00917.84
8.2.90.0030.00819.14
8.2.80.0050.00317.97
8.2.70.0200.00017.25
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0040.00418.26
8.2.30.0000.00918.13
8.2.20.0040.00420.50
8.2.10.0000.00818.13
8.2.00.0030.00519.22
8.1.330.0070.01121.79
8.1.320.0100.00916.26
8.1.310.0000.00816.23
8.1.300.0040.00417.88
8.1.290.0030.00630.84
8.1.280.0070.01625.92
8.1.270.0130.00723.77
8.1.260.0070.00326.35
8.1.250.0080.00028.09
8.1.240.0000.00921.37
8.1.230.0060.00618.97
8.1.220.0030.00617.78
8.1.210.0000.00918.77
8.1.200.0090.00317.48
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0080.00018.50
8.1.160.0030.00618.91
8.1.150.0000.00718.57
8.1.140.0040.00417.45
8.1.130.0030.00518.95
8.1.120.0040.00317.36
8.1.110.0040.00417.51
8.1.100.0030.00517.45
8.1.90.0040.00417.36
8.1.80.0050.00517.33
8.1.70.0030.00617.46
8.1.60.0000.00917.59
8.1.50.0080.00917.41
8.1.40.0140.00517.47
8.1.30.0190.00317.45
8.1.20.0150.00017.57
8.1.10.0160.00317.45
8.1.00.0170.00717.52
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0070.00018.30
8.0.270.0030.00316.89
8.0.260.0080.00018.39
8.0.250.0030.00316.95
8.0.240.0030.00316.94
8.0.230.0080.00016.89
8.0.220.0000.00816.77
8.0.210.0070.00016.91
8.0.200.0030.00316.85
8.0.190.0000.00816.95
8.0.180.0200.00016.88
8.0.170.0160.00316.94
8.0.160.0110.00816.73
8.0.150.0130.00616.72
8.0.140.0180.00016.75
8.0.130.0120.00416.79
8.0.120.0150.00516.88
8.0.110.0070.01116.87
8.0.100.0230.00016.70
8.0.90.0160.00416.83
8.0.80.0150.00416.85
8.0.70.0060.01316.68
8.0.60.0090.00416.88
8.0.50.0130.00016.78
8.0.30.0100.00516.92
8.0.20.0130.00016.88
8.0.10.0140.00516.90
7.4.330.0000.00515.55
7.4.320.0000.00616.42
7.4.300.0030.00316.59
7.4.290.0140.00716.50
7.4.280.0150.00716.61
7.4.270.0160.00416.55
7.4.260.0100.00016.59
7.4.250.0180.00316.39
7.4.240.0140.00516.41
7.4.230.0160.00816.36
7.4.220.0160.00216.50
7.4.210.0140.00716.48
7.4.200.0160.00416.39
7.4.190.0130.00316.59
7.4.180.0070.00216.59
7.4.160.0110.00516.53
7.4.150.0110.00516.61
7.4.140.0080.00316.45
7.4.130.0040.00416.46
7.4.120.0090.00516.45
7.4.110.0120.00016.57
7.4.100.0000.00916.54
7.4.90.0030.00316.44
7.4.80.0100.00516.47
7.4.70.0100.01016.45
7.4.60.0090.00016.31
7.4.50.0070.00016.29
7.4.40.0080.00416.37
7.4.30.0160.00216.34
7.4.20.0070.00516.34
7.4.10.0110.00316.42
7.4.00.0120.00616.50

preferences:
27.96 ms | 403 KiB | 5 Q