3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['id' => 1, 'date_inserted' => '2020-09-06', 'marketplace' => 'Etsy', 'total_stickers' => 11, 'total_orders' => 8, 'total_value' => 41.619999999999997], ['id' => 2, 'date_inserted' => '2020-09-06', 'marketplace' => 'Woo', 'total_stickers' => 2, 'total_orders' => 1, 'total_value' => 7.9800000000000004], ['id' => 3, 'date_inserted' => '2020-09-06', 'marketplace' => 'eBay', 'total_stickers' => 44, 'total_orders' => 40, 'total_value' => 115.63], ['id' => 4, 'date_inserted' => '2020-09-07', 'marketplace' => 'Etsy', 'total_stickers' => 8, 'total_orders' => 4, 'total_value' => 34.920000000000002], ['id' => 5, 'date_inserted' => '2020-09-07', 'marketplace' => 'Woo', 'total_stickers' => 9, 'total_orders' => 3, 'total_value' => '52.90'], ['id' => 6, 'date_inserted' => '2020-09-07', 'marketplace' => 'eBay', 'total_stickers' => 23, 'total_orders' => 21, 'total_value' => 58.030000000000001] ]; $result = []; foreach ($array as $row) { $level1 = $row['date_inserted']; $level2 = $row['marketplace']; unset($row['date_inserted'], $row['marketplace']); $result[$level1][$level2] = $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.4.120.0090.00220.41
8.4.110.0100.01118.83
8.4.100.0080.00817.84
8.4.90.0160.00518.66
8.4.80.0100.01017.96
8.4.70.0140.00817.93
8.4.60.0110.00918.44
8.4.50.0130.00717.69
8.4.40.0060.00920.62
8.4.30.0090.00623.91
8.4.20.0130.00719.74
8.4.10.0120.00321.99
8.3.250.0110.00918.88
8.3.240.0040.00517.38
8.3.230.0110.00816.50
8.3.220.0100.00817.09
8.3.210.0140.00616.91
8.3.200.0050.00516.41
8.3.190.0090.00817.18
8.3.180.0100.00416.68
8.3.170.0090.00918.89
8.3.160.0040.01518.28
8.3.150.0080.01117.25
8.3.140.0110.00716.72
8.3.130.0130.00716.64
8.3.120.0040.00420.93
8.3.110.0050.00520.94
8.3.100.0100.01020.22
8.3.90.0050.00226.77
8.3.80.0000.01018.30
8.3.70.0120.00316.48
8.3.60.0110.00716.50
8.3.50.0080.01118.53
8.3.40.0000.01423.54
8.3.30.0120.00318.66
8.3.20.0000.00824.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0090.00720.45
8.2.280.0070.00218.75
8.2.270.0140.00416.93
8.2.260.0060.00320.55
8.2.250.0040.01118.82
8.2.240.0030.00717.27
8.2.230.0030.00622.58
8.2.220.0060.01324.06
8.2.210.0160.00326.77
8.2.200.0090.00018.54
8.2.190.0070.00716.63
8.2.180.0100.01016.63
8.2.170.0120.00619.09
8.2.160.0070.01022.96
8.2.150.0000.00825.66
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0030.00519.69
8.2.110.0070.00322.08
8.2.100.0120.00017.91
8.2.90.0000.00818.03
8.2.80.0080.00019.23
8.2.70.0000.00817.75
8.2.60.0170.00217.00
8.2.50.0170.00317.50
8.2.40.0000.01617.25
8.2.30.0080.00817.63
8.2.20.0150.00317.22
8.2.10.0110.00617.38
8.2.00.0100.00617.25
8.1.330.0080.01020.31
8.1.320.0090.01016.37
8.1.310.0000.00816.76
8.1.300.0030.00616.05
8.1.290.0060.00330.84
8.1.280.0070.01025.92
8.1.270.0070.00024.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00422.65
8.1.230.0120.00020.89
8.1.220.0090.00017.74
8.1.210.0080.00018.85
8.1.200.0090.00017.35
8.1.190.0100.00717.13
8.1.180.0100.00917.13
8.1.170.0060.01017.13
8.1.160.0170.00017.12
8.1.150.0180.00417.38
8.1.140.0130.00317.11
8.1.130.0100.00717.34
8.1.120.0150.00417.13
8.1.110.0070.01017.13
8.1.100.0130.00317.25
8.1.90.0080.00817.00
8.1.80.0040.01217.25
8.1.70.0110.00417.25
8.1.60.0090.00917.50
8.1.50.0140.00517.25
8.1.40.0170.00017.25
8.1.30.0160.00317.25
8.1.20.0180.00017.50
8.1.10.0090.00917.00
8.1.00.0190.00017.00
8.0.300.0000.00720.07
8.0.290.0030.00616.75
8.0.280.0130.00416.75
8.0.270.0110.00516.52
8.0.260.0080.00816.61
8.0.250.0080.00816.60
8.0.240.0170.00016.63
8.0.230.0130.00416.75
8.0.220.0140.00416.52
8.0.210.0140.00516.52
8.0.200.0120.00516.52
8.0.190.0160.00016.52
8.0.180.0170.00016.63
8.0.170.0130.00416.52
8.0.160.0140.00316.52
8.0.150.0090.00916.63
8.0.140.0080.00816.52
8.0.130.0140.00316.52
8.0.120.0120.00416.52
8.0.110.0130.00316.52
8.0.100.0100.00516.63
8.0.90.0140.00416.63
8.0.80.0160.00316.63
8.0.70.0120.00616.63
8.0.60.0110.00616.52
8.0.50.0130.00416.59
8.0.30.0100.00516.63
8.0.20.0140.00316.75
8.0.10.0070.00816.63

preferences:
28.5 ms | 403 KiB | 5 Q