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 (!isset($ref[$key])) { $ref[$key] = [$row]; $result[] = &$ref[$key]; } else { $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.3.70.0100.01018.31
8.3.60.0130.00318.56
8.3.50.0070.01116.57
8.3.40.0130.00420.08
8.3.30.0070.00718.71
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0000.00826.16
8.2.190.0210.00016.63
8.2.180.0080.00818.41
8.2.170.0070.00718.82
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0040.00418.89
8.2.110.0050.00521.17
8.2.100.0090.00317.91
8.2.90.0080.00017.84
8.2.80.0040.00419.16
8.2.70.0060.00317.75
8.2.60.0040.00418.28
8.2.50.0000.00818.10
8.2.40.0050.00319.42
8.2.30.0110.00418.68
8.2.20.0060.01118.51
8.2.10.0110.00618.84
8.2.00.0170.00018.71
8.1.280.0110.00425.92
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00319.16
8.1.230.0070.00422.65
8.1.220.0050.00317.74
8.1.210.0000.00818.91
8.1.200.0000.00817.48
8.1.190.0060.00317.22
8.1.180.0060.00318.10
8.1.170.0180.00018.40
8.1.160.0150.00318.16
8.1.150.0060.01318.02
8.1.140.0110.00818.20
8.1.130.0190.00018.63
8.1.120.0080.01118.47
8.1.110.0180.00018.05
8.1.100.0150.00318.22
8.1.90.0160.00018.11
8.1.80.0150.00518.27
8.1.70.0160.00018.20
8.1.60.0150.00318.51
8.1.50.0180.00018.66
8.1.40.0120.00818.48
8.1.30.0130.00418.61
8.1.20.0160.00318.48
8.1.10.0180.00018.33
8.1.00.0170.00318.28
8.0.300.0040.00420.15
8.0.290.0040.00416.75
8.0.280.0060.01217.62
8.0.270.0180.00017.67
8.0.260.0150.00317.62
8.0.250.0100.00617.62
8.0.240.0140.00417.76
8.0.230.0160.00017.62
8.0.220.0120.00717.62
8.0.210.0130.00417.72
8.0.200.0090.00917.65
8.0.190.0120.00817.62
8.0.180.0110.00617.62
8.0.170.0030.01317.63
8.0.160.0180.00017.64
8.0.150.0120.00817.89
8.0.140.0140.00519.30
8.0.130.0140.00317.62
8.0.120.0150.00019.25
8.0.110.0140.00217.71
8.0.100.0130.00419.37
8.0.90.0060.01117.80
8.0.80.0120.00617.67
8.0.70.0050.01417.62
8.0.60.0130.00417.62
8.0.50.0110.00717.62
8.0.30.0130.00317.77
8.0.20.0080.00818.05
8.0.10.0090.00617.74

preferences:
34.68 ms | 401 KiB | 5 Q