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.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.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.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:
47.81 ms | 400 KiB | 5 Q