3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode('{ "list": [ { "Id": 398, "Product Title": "Banner", "Sku": "vb-13oz", "Short Description": "text", "Long Description": "text", "Cost": "0.95", "Price": "3.25", "Category": [{ "Id": 9, "Title": "Banners" }], "Attribute Sides": [{ "Id": 1, "Title": "1 Side" }], "Attribute Grommets": [ { "Id": 1, "Title": "Every 2\' All Sides" }, { "Id": 2, "Title": "Every 2\' Top and Bottom" }, { "Id": 3, "Title": "Every 2\' Left & Right" }, { "Id": 4, "Title": "4 Corners Only" }, { "Id": 5, "Title": "No Gromments" } ] } ] }', true); foreach($data['list'] as $key => $item) { $data['list'][$key]['Attribute Grommets'] = [ [ 'Id' => $item['Attribute Grommets'][0]['Id'], 'Title' => implode(' | ', array_column($item['Attribute Grommets'], 'Title')) ] ]; } echo json_encode($data, JSON_PRETTY_PRINT);

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.0130.00720.69
8.4.110.0070.00322.54
8.4.100.0110.01017.84
8.4.90.0140.00620.65
8.4.80.0130.00717.85
8.4.70.0040.00517.89
8.4.60.0110.00920.34
8.4.50.0120.00821.29
8.4.40.0140.00718.61
8.4.30.0190.00018.92
8.4.20.0140.00719.73
8.4.10.0030.00619.72
8.3.250.0110.00819.16
8.3.240.0110.00816.80
8.3.230.0130.00716.68
8.3.220.0150.00417.13
8.3.210.0110.00716.66
8.3.200.0060.00316.43
8.3.190.0140.00516.95
8.3.180.0100.00916.96
8.3.170.0130.00619.08
8.3.160.0030.00718.37
8.3.150.0150.00616.95
8.3.140.0090.00618.42
8.3.130.0040.00418.49
8.3.120.0040.00419.17
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0060.00326.77
8.3.80.0120.00318.56
8.3.70.0070.01418.43
8.3.60.0170.01025.92
8.3.50.0160.00725.92
8.3.40.0340.01025.92
8.3.30.0380.00625.92
8.3.20.0360.01225.92
8.3.10.0510.01025.92
8.3.00.0360.00925.92
8.2.290.0100.00820.29
8.2.280.0020.00618.26
8.2.270.0170.00317.15
8.2.260.0120.00616.37
8.2.250.0080.00016.46
8.2.240.0040.00418.67
8.2.230.0040.00422.58
8.2.220.0100.00037.54
8.2.210.0120.00626.77
8.2.200.0110.00016.63
8.2.190.0100.01018.54
8.2.180.0430.00725.92
8.2.170.0370.01825.92
8.2.160.0330.01125.92
8.2.150.0350.00725.92
8.2.140.0310.00425.92
8.2.130.0340.00725.92
8.2.120.0390.01125.92
8.2.110.0430.00725.92
8.2.100.0370.01025.92
8.2.90.0400.01225.92
8.2.80.0290.01925.92
8.2.70.0530.01225.92
8.2.60.0450.00925.92
8.2.50.0330.00825.92
8.2.40.0380.01325.92
8.2.30.0450.00325.92
8.2.20.0430.00925.92
8.2.10.0280.02025.92
8.2.00.0300.01025.92
8.1.330.0100.00816.52
8.1.320.0110.00816.28
8.1.310.0040.00417.93
8.1.300.0040.01118.23
8.1.290.0070.00430.84
8.1.280.0270.01025.92
8.1.270.0380.01025.92
8.1.260.0340.01025.92
8.1.250.0380.01325.92
8.1.240.0290.01625.92
8.1.230.0330.00725.92
8.1.220.0340.00625.92
8.1.210.0360.00325.92
8.1.200.0420.00625.92
8.1.190.0390.01225.92
8.1.180.0380.00825.92
8.1.170.0280.01425.92
8.1.160.0220.00725.92
8.1.150.0240.00725.92
8.1.140.0270.00325.92
8.1.130.0180.01225.92
8.1.120.0290.00425.92
8.1.110.0280.01425.92
8.1.100.0390.00625.92
8.1.90.0460.01425.92
8.1.80.0270.01725.92
8.1.70.0410.01425.92
8.1.60.0290.01225.92
8.1.50.0310.00925.92
8.1.40.0400.00025.92
8.1.30.0350.01125.92
8.1.20.0390.01525.92
8.1.10.0340.01225.92
8.1.00.0300.00425.92

preferences:
26.12 ms | 403 KiB | 5 Q