3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ ['rank' => '579', 'id' => '1', 'foo' => 'a'], ['rank' => '251', 'id' => '2', 'foo' => 'b'], ]; $b = [ ['size' => 'S', 'status' => 'A', 'id' => '1', 'foo' => 'c'], ['size' => 'L', 'status' => 'A', 'id' => '2', 'foo' => 'd'], ]; $result = []; foreach (array_merge($a, $b) as $row) { $result[$row['id']] = ($result[$row['id']] ?? []) + $row; } 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.4.140.0140.00717.47
8.4.130.0120.01117.68
8.4.120.0130.00624.06
8.4.110.0130.00622.38
8.4.100.0110.01017.95
8.4.90.0050.00419.51
8.4.80.0140.00517.75
8.4.70.0090.00918.04
8.4.60.0070.00218.73
8.4.50.0130.00718.34
8.4.40.0130.00317.88
8.4.30.0050.00318.70
8.4.20.0100.01019.56
8.4.10.0060.00324.05
8.3.270.0090.01316.58
8.3.260.0140.00616.64
8.3.250.0110.00418.87
8.3.240.0090.00916.69
8.3.230.0050.00316.52
8.3.220.0050.00217.05
8.3.210.0110.00916.69
8.3.200.0050.00416.59
8.3.190.0040.00417.18
8.3.180.0060.00516.64
8.3.170.0120.00618.75
8.3.160.0070.01117.19
8.3.150.0110.00718.90
8.3.140.0050.00519.17
8.3.130.0090.00018.24
8.3.120.0100.01018.86
8.3.110.0060.00320.94
8.3.100.0040.00416.39
8.3.90.0040.01126.77
8.3.80.0030.00618.31
8.3.70.0140.00716.58
8.3.60.0040.01116.38
8.3.50.0000.01518.08
8.3.40.0000.01819.95
8.3.30.0070.00718.89
8.3.20.0000.00724.18
8.3.10.0060.00324.66
8.3.00.0040.00426.16
8.2.290.0100.00920.36
8.2.280.0110.00818.60
8.2.270.0070.00717.56
8.2.260.0120.00318.73
8.2.250.0000.00916.43
8.2.240.0040.01117.37
8.2.230.0040.00422.58
8.2.220.0060.00324.06
8.2.210.0000.00826.77
8.2.200.0000.00916.63
8.2.190.0100.00716.63
8.2.180.0190.00025.92
8.2.170.0030.01018.93
8.2.160.0110.00422.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0030.00721.12
8.2.100.0080.00418.26
8.2.90.0040.00419.52
8.2.80.0030.00518.04
8.2.70.0040.00418.04
8.2.60.0040.00418.22
8.2.50.0000.00918.10
8.2.40.0040.00419.94
8.2.30.0000.00717.98
8.2.20.0040.00419.37
8.2.10.0040.00418.11
8.2.00.0060.00319.22
8.1.330.0100.00922.06
8.1.320.0110.00816.13
8.1.310.0080.00018.40
8.1.300.0040.00419.70
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0130.00624.66
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0000.00822.06
8.1.230.0040.00819.02
8.1.220.0080.00017.77
8.1.210.0030.00718.77
8.1.200.0030.00617.34
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0000.00818.72
8.1.160.0030.00518.94
8.1.150.0050.00218.64
8.1.140.0040.00417.39
8.1.130.0000.00918.61
8.1.120.0100.00318.75
8.1.110.0070.01018.70
8.1.100.0100.00718.74
8.1.90.0100.00518.64
8.1.80.0080.00818.70
8.1.70.0100.00618.70
8.1.60.0090.00918.79
8.1.50.0050.01018.73
8.1.40.0140.00518.74
8.1.30.0120.00418.84
8.1.20.0160.00318.75
8.1.10.0130.00718.76
8.1.00.0150.00618.71
8.0.300.0000.00721.63
8.0.290.0000.01116.75
8.0.280.0030.00318.45
8.0.270.0040.00417.29
8.0.260.0100.00317.98
8.0.250.0130.00018.13
8.0.240.0050.01018.18
8.0.230.0130.00318.00
8.0.220.0090.00517.96
8.0.210.0120.00418.02
8.0.200.0140.00318.07
8.0.190.0080.00818.13
8.0.180.0140.00217.99
8.0.170.0120.00317.98
8.0.160.0110.00618.05
8.0.150.0080.00817.93
8.0.140.0140.00318.09
8.0.130.0100.00719.80
8.0.120.0160.00018.02
8.0.110.0090.00617.98
8.0.100.0160.00018.06
8.0.90.0090.00918.00
8.0.80.0120.00218.02
8.0.70.0130.00317.93
8.0.60.0100.00518.02
8.0.50.0150.00018.02
8.0.30.0150.00017.96
8.0.20.0040.01217.99
8.0.10.0140.00018.20

preferences:
34.61 ms | 403 KiB | 5 Q