3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ "id" => 96, "shipping_no" => "212755-1", "part_no" => "reterty", "description" => "tyrfyt", "packaging_type" => "PC" ], [ "id" => 96, "shipping_no" => "212755-1", "part_no" => "dftgtryh", "description" => "dfhgfyh", "packaging_type" => "PC" ], [ "id" => 97, "shipping_no" => "212755-2", "part_no" => "ZeoDark", "description" => "s%c%s%c%s", "packaging_type" => "PC" ] ]; function array_group_by_keys(&$arr, $keys) { if (count($arr) < 2){ $arr = array_shift($arr[0]); return; } foreach ($arr as $k => $item) { $fvalue = array_shift($item); $arr[$fvalue][] = $item; unset($arr[$k]); } array_shift($keys); foreach ($arr as &$sub_arr) { array_group_by_keys($sub_arr, $keys); } } array_group_by_keys($array, ['id', 'shipping_no']); var_export($array);

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.10.0110.00719.70
8.5.00.0110.01219.83
8.4.160.0140.00823.82
8.4.150.0020.00114.05
8.4.140.0140.00817.57
8.4.130.0130.01217.57
8.4.120.0120.00920.62
8.4.110.0140.00518.84
8.4.100.0060.00317.72
8.4.90.0090.00617.75
8.4.80.0080.01219.39
8.4.70.0040.00417.95
8.4.60.0060.00618.84
8.4.50.0130.00718.68
8.4.40.0060.00318.66
8.4.30.0080.00023.78
8.4.20.0170.00319.59
8.4.10.0090.00019.43
8.3.280.0060.00418.54
8.3.270.0110.00816.64
8.3.260.0110.00916.59
8.3.250.0080.01118.86
8.3.240.0120.00816.51
8.3.230.0090.00816.64
8.3.220.0120.00621.14
8.3.210.0140.00616.75
8.3.200.0040.00516.47
8.3.190.0060.00317.31
8.3.180.0110.00918.83
8.3.170.0140.00318.87
8.3.160.0070.01118.42
8.3.150.0060.01218.87
8.3.140.0060.00616.62
8.3.130.0040.00416.62
8.3.120.0340.00816.41
8.3.110.0370.00816.55
8.3.100.0400.00816.70
8.3.90.0420.00516.64
8.3.80.0310.00916.42
8.3.70.0430.00316.55
8.3.60.0340.00916.55
8.3.50.0380.00816.49
8.3.40.0240.00317.46
8.3.30.0260.00417.43
8.3.20.0300.01217.27
8.3.10.0200.01217.23
8.3.00.0110.00518.19
8.2.290.0070.00419.07
8.2.280.0070.01216.30
8.2.270.0070.01116.61
8.2.260.0080.00017.59
8.2.250.0000.00816.62
8.2.240.0270.00616.36
8.2.230.0260.00416.09
8.2.220.0250.00417.23
8.2.210.0110.00816.38
8.2.200.0140.00816.48
8.2.190.0150.00516.37
8.2.180.0170.00316.46
8.2.170.0210.00517.55
8.2.160.0280.00217.54
8.2.150.0270.00317.36
8.2.140.0220.00817.28
8.2.130.0190.00917.23
8.2.120.0170.01117.46
8.2.110.0230.00717.49
8.2.100.0260.00317.41
8.2.90.0210.01117.51
8.2.80.0240.00917.33
8.2.70.0280.00317.47
8.2.60.0210.00717.27
8.2.50.0240.00417.57
8.2.40.0210.00017.52
8.2.30.0070.01017.36
8.2.20.0260.00217.40
8.2.10.0220.00317.16
8.2.00.0160.00717.34
8.1.330.0160.00816.38
8.1.320.0080.00718.13
8.1.310.0040.00416.67
8.1.300.0200.00715.93
8.1.290.0240.00615.85
8.1.280.0230.00716.04
8.1.270.0290.00517.08
8.1.260.0230.00117.09
8.1.250.0200.00917.13
8.1.240.0240.00317.17
8.1.230.0160.00717.23
8.1.220.0180.00917.36
8.1.210.0240.00316.99
8.1.200.0150.00317.10
8.1.190.0140.00317.18
8.1.180.0170.01017.00
8.1.170.0170.00916.87
8.1.160.0210.00617.19
8.1.150.0250.00316.98
8.1.140.0200.00717.04
8.1.130.0200.00717.19
8.1.120.0150.01017.28
8.1.110.0220.00417.14
8.1.100.0190.01017.01
8.1.90.0270.00517.14
8.1.80.0230.00717.01
8.1.70.0210.00617.31
8.1.60.0250.00617.17
8.1.50.0180.00717.15
8.1.40.0230.00317.40
8.1.30.0170.00617.17
8.1.20.0220.00517.26
8.1.10.0180.00317.32
8.1.00.0160.00317.19
7.3.20.0190.00618.03

preferences:
65.58 ms | 403 KiB | 5 Q