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']] = $row + ($result[$row['id']] ?? []); } 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.0090.00616.38
8.3.50.0120.00318.32
8.3.40.0100.00720.06
8.3.30.0090.00618.71
8.3.20.0050.00324.18
8.3.10.0140.00324.66
8.3.00.0000.00726.16
8.2.180.0120.00625.92
8.2.170.0040.01118.91
8.2.160.0060.01222.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0030.00622.13
8.2.100.0080.00419.64
8.2.90.0040.00417.88
8.2.80.0050.00318.86
8.2.70.0000.00817.88
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0000.00818.09
8.2.30.0060.00318.15
8.2.20.0040.00419.34
8.2.10.0000.00718.15
8.2.00.0040.00419.36
8.1.280.0160.00025.92
8.1.270.0060.00323.92
8.1.260.0100.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00318.84
8.1.230.0070.00417.70
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0000.00818.89
8.1.160.0070.00018.93
8.1.150.0050.00218.63
8.1.140.0040.00417.50
8.1.130.0040.00718.51
8.1.120.0090.00618.61
8.1.110.0170.00018.72
8.1.100.0160.00318.69
8.1.90.0150.00318.67
8.1.80.0120.00618.69
8.1.70.0110.00718.77
8.1.60.0070.01018.76
8.1.50.0160.00018.73
8.1.40.0090.00918.87
8.1.30.0160.00318.89
8.1.20.0150.00418.89
8.1.10.0140.00718.71
8.1.00.0170.00318.62
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00518.36
8.0.270.0000.00717.13
8.0.260.0100.00518.14
8.0.250.0050.01117.98
8.0.240.0090.00218.08
8.0.230.0120.00218.06
8.0.220.0120.00418.04
8.0.210.0070.01017.89
8.0.200.0100.00818.07
8.0.190.0090.00618.02
8.0.180.0100.00518.02
8.0.170.0130.00318.07
8.0.160.0060.00918.12
8.0.150.0170.00218.12
8.0.140.0090.00618.01
8.0.130.0110.00518.07
8.0.120.0120.00418.00
8.0.110.0080.00818.03
8.0.100.0100.00518.00
8.0.90.0050.01118.16
8.0.80.0080.00817.98
8.0.70.0110.00618.07
8.0.60.0090.00618.05
8.0.50.0090.00518.04
8.0.30.0100.00717.95
8.0.20.0100.00518.01
8.0.10.0130.00318.30

preferences:
53.67 ms | 400 KiB | 5 Q