3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ "total_process_per_category" => "6", "category_id" => "1" ], [ "total_process_per_category" => "2", "category_id" => "2" ] ]; $array2 = [ [ "total_pinned_per_category" => "16", "category_id" => "1" ], [ "total_pinned_per_category" => "4", "category_id" => "2" ] ]; var_export( array_values( array_reduce( array_merge($array1, $array2), function ($result, $row) { $result[$row['category_id']] = ($result[$row['category_id']] ?? []) + $row; return $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.80.0030.00616.50
8.3.70.0120.00616.58
8.3.60.0030.01718.31
8.3.50.0100.00720.36
8.3.40.0040.01121.68
8.3.30.0110.00418.67
8.3.20.0000.00724.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.200.0030.00616.75
8.2.190.0060.01216.88
8.2.180.0040.01125.92
8.2.170.0100.00718.91
8.2.160.0110.00322.96
8.2.150.0070.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0030.00619.16
8.2.100.0040.00817.97
8.2.90.0050.00319.34
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0030.00517.63
8.2.50.0000.00817.75
8.2.40.0040.00419.59
8.2.30.0060.00317.89
8.2.20.0040.00420.46
8.2.10.0000.00718.12
8.2.00.0000.00819.25
8.1.290.0060.00330.84
8.1.280.0060.01225.92
8.1.270.0040.00423.99
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0000.01022.51
8.1.230.0060.00617.83
8.1.220.0030.00517.79
8.1.210.0000.00918.77
8.1.200.0080.00017.48
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00719.03
8.1.160.0030.00518.79
8.1.150.0000.00818.71
8.1.140.0040.00417.44
8.1.130.0030.00319.02
8.1.120.0040.00417.38
8.1.110.0040.00417.36
8.1.100.0030.00517.50
8.1.90.0000.00717.41
8.1.80.0090.00317.37
8.1.70.0050.00517.46
8.1.60.0140.00017.50
8.1.50.0070.00717.55
8.1.40.0110.00517.56
8.1.30.0070.00717.58
8.1.20.0030.00717.63
8.1.10.0120.00317.49
8.1.00.0150.00317.53
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0070.00017.97
8.0.270.0030.00518.02
8.0.260.0000.00718.44
8.0.250.0030.00316.92
8.0.240.0000.00716.84
8.0.230.0000.00916.87
8.0.220.0000.00716.90
8.0.210.0080.00616.95
8.0.200.0120.00316.93
8.0.190.0110.00416.99
8.0.180.0130.00316.95
8.0.170.0130.00016.96
8.0.160.0050.01016.95
8.0.150.0100.00516.98
8.0.140.0110.00416.80
8.0.130.0150.00017.00
8.0.120.0050.01016.96
8.0.110.0060.00616.79
8.0.100.0070.00716.82
8.0.90.0110.00416.96
8.0.80.0100.00516.96
8.0.70.0110.00016.76
8.0.60.0080.00816.93
8.0.50.0120.00616.82
8.0.30.0080.00416.81
8.0.20.0080.00216.93
8.0.10.0050.00817.05
7.4.330.0000.00515.55
7.4.320.0060.00016.51
7.4.300.0040.00416.62
7.4.290.0070.00216.34
7.4.280.0030.00816.22
7.4.270.0050.00516.12
7.4.260.0000.00916.65
7.4.250.0090.00016.35
7.4.240.0160.00016.62
7.4.230.0120.00016.59
7.4.220.0070.00316.42
7.4.210.0060.00316.52
7.4.200.0090.00316.52
7.4.190.0030.00916.52
7.4.180.0080.00616.65
7.4.160.0110.00416.47
7.4.150.0000.01316.41
7.4.140.0060.00316.38
7.4.130.0030.00616.38
7.4.120.0090.00316.20
7.4.110.0130.00016.41
7.4.100.0130.00016.44
7.4.90.0080.00516.37
7.4.80.0080.00416.46
7.4.70.0100.00216.55
7.4.60.0080.00516.59
7.4.50.0110.00016.39
7.4.40.0070.00716.40
7.4.30.0070.00316.42
7.4.20.0090.00516.30
7.4.10.0040.00416.45
7.4.00.0040.00416.55

preferences:
49.83 ms | 402 KiB | 5 Q