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" ] ]; $result = []; foreach ($array as $row) { $key = $row['id']; // assign the grouping column's value // unset($row['id']); // if you don't want grouping column in your grouped rows, remove it if (!isset($ref[$key])) { $result[] =& $ref[$key]; } $ref[$key][] = $row; } var_export($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.5.00.0120.01020.25
8.4.150.0020.00114.05
8.4.140.0100.01017.40
8.4.130.0110.01017.55
8.4.120.0100.01120.71
8.4.110.0090.01018.54
8.4.100.0110.01117.71
8.4.90.0130.00718.68
8.4.80.0090.00419.69
8.4.70.0130.00717.77
8.4.60.0070.00418.65
8.4.50.0150.00619.66
8.4.40.0060.00918.75
8.4.30.0000.01924.14
8.4.20.0040.00419.43
8.4.10.0130.00319.48
8.3.280.0100.01118.51
8.3.270.0100.00916.81
8.3.260.0120.00716.43
8.3.250.0030.00518.95
8.3.240.0120.00816.49
8.3.230.0100.00616.59
8.3.220.0120.00717.34
8.3.210.0100.00816.78
8.3.200.0040.00416.59
8.3.190.0120.00717.43
8.3.180.0120.00816.83
8.3.170.0090.00916.97
8.3.160.0110.00720.80
8.3.150.0080.00017.46
8.3.140.0110.00718.61
8.3.130.0120.00316.62
8.3.120.0190.00416.54
8.3.110.0110.00516.49
8.3.100.0100.00716.36
8.3.90.0100.00316.46
8.3.80.0070.00316.60
8.3.70.0110.00016.46
8.3.60.0040.00716.44
8.3.50.0030.00616.68
8.3.40.0080.00417.47
8.3.30.0100.00017.72
8.3.20.0110.00017.47
8.3.10.0080.00417.54
8.3.00.0110.00017.62
8.2.290.0100.00920.47
8.2.280.0100.00518.30
8.2.270.0160.00316.87
8.2.260.0080.00017.07
8.2.250.0100.00716.68
8.2.240.0080.00416.54
8.2.230.0040.00716.43
8.2.220.0040.00816.53
8.2.210.0070.00316.53
8.2.200.0110.00016.56
8.2.190.0000.01116.60
8.2.180.0090.00616.19
8.2.170.0180.00017.45
8.2.160.0180.00417.28
8.2.150.0140.00517.32
8.2.140.0150.00417.45
8.2.130.0130.00417.19
8.2.120.0070.01017.33
8.2.110.0040.01317.54
8.2.100.0090.00917.47
8.2.90.0100.00717.63
8.2.80.0150.00317.31
8.2.70.0120.00417.58
8.2.60.0140.00417.10
8.2.50.0190.00417.12
8.2.40.0150.00417.34
8.2.30.0050.01017.66
8.2.20.0160.00016.75
8.2.10.0110.00716.77
8.2.00.0130.00517.37
8.1.330.0110.00723.63
8.1.320.0120.00916.30
8.1.310.0090.00916.73
8.1.300.0100.00815.97
8.1.290.0150.00315.71
8.1.280.0110.00515.82
8.1.270.0110.00617.12
8.1.260.0090.00917.14
8.1.250.0160.00317.18
8.1.240.0140.00417.18
8.1.230.0150.00317.19
8.1.220.0080.00817.05
8.1.210.0120.00816.82
8.1.200.0140.00316.43
8.1.190.0110.00717.09
8.1.180.0130.00416.87
8.1.170.0150.00416.82
8.1.160.0140.00516.71
8.1.150.0160.00316.79
8.1.140.0040.01317.05
8.1.130.0160.00316.49
8.1.120.0150.00216.71
8.1.110.0060.01216.99
8.1.100.0170.00016.70
8.1.90.0070.00717.16
8.1.80.0130.00416.95
8.1.70.0160.00316.94
8.1.60.0170.00216.85
8.1.50.0150.00416.61
8.1.40.0070.01017.39
8.1.30.0130.00416.93
8.1.20.0070.01017.49
8.1.10.0150.00317.52
8.1.00.0120.00616.89

preferences:
73.3 ms | 403 KiB | 5 Q