3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ ["id" => 1, "begin" => "01/01", "diagnostic" => "a"], ["id" => 1, "begin" => "01/01", "diagnostic" => "b"], ["id" => 1, "begin" => "01/01", "diagnostic" => ""], ["id" => 1, "begin" => "02/02", "diagnostic" => "a"], ]; $result = []; foreach ($data as $row) { $compositeKey = $row['id'] . '-' . $row['begin']; if (!isset($result[$compositeKey])) { $result[$compositeKey] = $row; } elseif (strlen($row['diagnostic'])) { $result[$compositeKey]['diagnostic'] .= (strlen($result[$compositeKey]['diagnostic']) ? ', ' : '') . $row['diagnostic']; } } var_export(array_values($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.5.00.0110.01023.00
8.4.150.0020.00114.05
8.4.140.0110.01117.77
8.4.130.0120.00817.79
8.4.120.0120.00919.31
8.4.110.0080.00917.66
8.4.100.0110.01017.89
8.4.90.0120.00722.23
8.4.80.0090.01119.07
8.4.70.0110.01020.84
8.4.60.0100.00520.57
8.4.50.0110.00918.59
8.4.40.0150.00622.41
8.4.30.0100.01020.51
8.4.20.0140.00618.05
8.4.10.0030.00622.32
8.3.280.0140.00718.64
8.3.270.0100.00916.73
8.3.260.0140.00516.61
8.3.250.0120.00716.48
8.3.240.0050.00416.72
8.3.230.0100.00816.75
8.3.220.0030.00419.12
8.3.210.0070.00116.61
8.3.200.0070.00216.83
8.3.190.0080.00816.79
8.3.180.0040.00416.79
8.3.170.0150.00418.85
8.3.160.0090.00918.47
8.3.150.0150.00416.63
8.3.140.0080.00017.13
8.3.130.0050.00518.51
8.3.120.0040.00420.68
8.3.110.0090.00616.86
8.3.100.0130.00016.62
8.3.90.0000.00926.77
8.3.80.0040.00716.75
8.3.70.0090.00616.63
8.3.60.0100.00716.63
8.3.50.0070.00719.98
8.3.40.0120.00321.80
8.3.30.0080.00818.84
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0090.00026.16
8.2.290.0120.00616.67
8.2.280.0150.00717.95
8.2.270.0090.00918.86
8.2.260.0150.00416.52
8.2.250.0080.00017.07
8.2.240.0060.00317.14
8.2.230.0080.00020.94
8.2.220.0060.00324.06
8.2.210.0040.00426.77
8.2.200.0060.00316.63
8.2.190.0120.00318.04
8.2.180.0090.00925.92
8.2.170.0150.00618.77
8.2.160.0060.00922.96
8.2.150.0050.00225.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0100.00021.11
8.2.100.0060.00617.75
8.2.90.0080.00019.05
8.2.80.0050.00317.97
8.2.70.0050.00317.75
8.2.60.0060.00618.03
8.2.50.0060.00318.07
8.2.40.0000.00818.09
8.2.30.0000.00718.02
8.2.20.0070.00022.20
8.2.10.0000.00718.01
8.2.00.0050.00219.36
8.1.330.0120.00716.16
8.1.320.0130.00718.07
8.1.310.0000.00718.54
8.1.300.0000.00818.66
8.1.290.0060.00330.84
8.1.280.0100.00725.92
8.1.270.0030.00723.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00422.50
8.1.230.0080.00417.42
8.1.220.0080.00017.79
8.1.210.0030.00618.77
8.1.200.0060.00317.38
8.1.190.0060.00317.35
8.1.180.0030.00618.10
8.1.170.0040.00418.56
8.1.160.0020.00518.95
8.1.150.0040.00418.59
8.1.140.0050.00317.38
8.1.130.0000.00718.81
8.1.120.0050.00317.50
8.1.110.0080.00017.43
8.1.100.0040.00417.52
8.1.90.0040.00417.38
8.1.80.0000.00817.44
8.1.70.0060.00317.43
8.1.60.0120.00017.50
8.1.50.0090.00517.48
8.1.40.0090.00917.50
8.1.30.0190.00017.63
8.1.20.0160.00317.56
8.1.10.0130.00517.52
8.1.00.0130.00517.48
8.0.300.0090.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.50
8.0.270.0030.00316.79
8.0.260.0060.00018.46
8.0.250.0030.00416.85
8.0.240.0070.00016.95
8.0.230.0040.00417.00
8.0.220.0070.00016.91
8.0.210.0100.00516.74
8.0.200.0050.00516.79
8.0.190.0120.00016.91
8.0.180.0110.00416.82
8.0.170.0080.00616.81
8.0.160.0120.00316.82
8.0.150.0040.00916.80
8.0.140.0100.00316.86
8.0.130.0000.01016.80
8.0.120.0050.00516.85
8.0.110.0050.00516.78
8.0.100.0030.01016.70
8.0.90.0140.00016.79
8.0.80.0120.00316.73
8.0.70.0140.00016.77
8.0.60.0090.00516.89
8.0.50.0030.00916.88
8.0.30.0080.00416.88
8.0.20.0100.00016.99
8.0.10.0100.00216.91
7.4.330.0030.00315.55
7.4.320.0070.00016.50
7.4.300.0050.00516.08
7.4.290.0140.00016.55
7.4.280.0110.00516.60
7.4.270.0080.00816.40
7.4.260.0180.00016.58
7.4.250.0090.00916.61
7.4.240.0150.00316.48
7.4.230.0180.00016.50
7.4.220.0130.00316.57
7.4.210.0050.01016.54
7.4.200.0100.00516.53
7.4.190.0090.00616.69
7.4.180.0130.00316.66
7.4.160.0160.00016.45
7.4.150.0100.00616.55
7.4.140.0140.00016.44
7.4.130.0070.00716.43
7.4.120.0110.00016.46
7.4.110.0090.00216.35
7.4.100.0040.00916.52
7.4.90.0110.00416.41
7.4.80.0070.00716.48
7.4.70.0140.00016.51
7.4.60.0100.00016.58
7.4.50.0050.00516.32
7.4.40.0040.00416.38
7.4.30.0030.00316.34
7.4.20.0000.00616.46
7.4.10.0030.00316.54
7.4.00.0000.00716.57

preferences:
46.37 ms | 403 KiB | 5 Q