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) { ['date_inserted' => $level1, 'marketplace' => $level2] = array_splice($row, 1, 2); $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.140.0120.01117.47
8.4.130.0140.00618.06
8.4.120.0100.00922.18
8.4.110.0070.00322.58
8.4.100.0110.00917.59
8.4.90.0070.00418.45
8.4.80.0140.00817.66
8.4.70.0100.00617.91
8.4.60.0110.00918.66
8.4.50.0140.00717.79
8.4.40.0100.01020.70
8.4.30.0090.00923.80
8.4.20.0120.00319.52
8.4.10.0160.00021.86
8.3.270.0160.00816.66
8.3.260.0120.00816.63
8.3.250.0120.00618.79
8.3.240.0120.00716.67
8.3.230.0120.00816.59
8.3.220.0050.00417.18
8.3.210.0130.00618.50
8.3.200.0040.00516.75
8.3.190.0100.00917.11
8.3.180.0050.00516.77
8.3.170.0040.01119.18
8.3.160.0040.01418.26
8.3.150.0130.00620.83
8.3.140.0110.00316.48
8.3.130.0080.00018.42
8.3.120.0060.00319.07
8.3.110.0000.00820.94
8.3.100.0090.00024.06
8.3.90.0040.00426.77
8.3.80.0030.00618.31
8.3.70.0120.00616.75
8.3.60.0110.01116.61
8.3.50.0090.00616.54
8.3.40.0030.01723.75
8.3.30.0040.01118.76
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00822.01
8.2.280.0110.00818.61
8.2.270.0160.00317.00
8.2.260.0040.00420.30
8.2.250.0130.00616.79
8.2.240.0030.00517.41
8.2.230.0050.00322.58
8.2.220.0060.00337.54
8.2.210.0060.01226.77
8.2.200.0060.00318.41
8.2.190.0170.00016.58
8.2.180.0080.00816.59
8.2.170.0140.00419.00
8.2.160.0140.00722.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0030.00519.66
8.2.110.0070.00420.86
8.2.100.0040.00818.03
8.2.90.0040.00417.68
8.2.80.0060.00319.95
8.2.70.0060.00317.75
8.2.60.0140.00517.25
8.2.50.0160.00317.38
8.2.40.0130.00317.25
8.2.30.0100.00517.38
8.2.20.0140.00417.50
8.2.10.0100.00617.37
8.2.00.0170.00017.50
8.1.330.0090.01021.86
8.1.320.0110.00816.16
8.1.310.0000.00816.79
8.1.300.0030.00619.66
8.1.290.0090.00030.84
8.1.280.0100.00725.92
8.1.270.0030.00524.66
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00422.43
8.1.230.0040.00820.97
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0200.00017.00
8.1.180.0130.00416.88
8.1.170.0130.00817.13
8.1.160.0130.00317.34
8.1.150.0000.01617.25
8.1.140.0120.00417.10
8.1.130.0090.00616.88
8.1.120.0110.00617.23
8.1.110.0120.00617.13
8.1.100.0130.00617.38
8.1.90.0090.00917.25
8.1.80.0140.00317.35
8.1.70.0170.00017.23
8.1.60.0140.00417.47
8.1.50.0090.00917.25
8.1.40.0130.00417.48
8.1.30.0150.00817.50
8.1.20.0090.00917.13
8.1.10.0060.01117.38
8.1.00.0100.00717.23
8.0.300.0060.00320.03
8.0.290.0030.00616.75
8.0.280.0000.01716.52
8.0.270.0100.00716.52
8.0.260.0180.00016.52
8.0.250.0150.00316.72
8.0.240.0110.00716.52
8.0.230.0120.00516.52
8.0.220.0130.00416.52
8.0.210.0110.00516.52
8.0.200.0100.00716.63
8.0.190.0080.00816.52
8.0.180.0120.00516.52
8.0.170.0140.00316.52
8.0.160.0100.00716.75
8.0.150.0160.00016.61
8.0.140.0090.00916.52
8.0.130.0110.00416.52
8.0.120.0110.00516.52
8.0.110.0100.00516.52
8.0.100.0040.01216.75
8.0.90.0160.00016.52
8.0.80.0110.00516.75
8.0.70.0130.00316.63
8.0.60.0120.00416.52
8.0.50.0120.00316.75
8.0.30.0180.00016.52
8.0.20.0110.00716.73
8.0.10.0170.00016.63

preferences:
34.3 ms | 403 KiB | 5 Q