3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = '{ "data": [{ "approved": null, "approved_user_id": null, "boxes": [], "created": "2020-05-19T21", "created_at": "2020-05-19T21", "edited": null, "edited_in_affiliate": null, "edited_in_hdr": null, "edited_in_web_app": null, "erp_project_id": null, "error_description": "", "header_fields": [{ "boxes": [], "code": "creditor_number", "data_type": "", "error": "", "feature_id": "nvnnn", "value": "hhhhh" }, { "boxes": [], "code": "payment_account_number", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "order_number", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "total_amount_incl_vat", "data_type": "", "error": "", "feature_id": "mmm", "value": "hhh" }, { "approved": null, "approved_user_id": null, "boxes": [], "created": "2020-05-19", "created_at": "2020-05-19", "edited": null, "edited_in_affiliate": null, "edited_in_hdr": null, "edited_in_web_app": null, "erp_project_id": null, "error_description": "", "header_fields": [{ "boxes": [], "code": "reference", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "payment_swift_bic", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "recipient_vat_reg_no", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "joint_payment_id", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "catalog_debitor_id", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "case_number", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "payment_account_number", "data_type": "", "error": "", "value": "" }, { "boxes": [], "code": "payment_iban", "data_type": "", "error": "", "value": "" } ], "id": "00000", "image": "https://skkkkkllllllllll", "line_items": [], "note": "", "organization_id": 11111, "organization_voucher_id": 7777, "page_count": 1, "status": "successful", "type": "voucher", "upload_type": "affiliate", "uploaded_by_user_id": "0000001", "user_payment_method": "", "user_voucher_type": "" } ] }], "meta": { "count": 2 } }'; // IMPORTANT: feature_ids, ids, uploaded_by_user_ids, image MUST ALL BE QUOTE-WRAPPED. // IMPORTANT: commas must separate entries in the json string. // IMPORTANT: your json string was not closed with the appropriate number and type of braces. // use https://jsonlint.com/ to see how your json is invalid function unpackHeaderFields($value, $t = "\t") { foreach ($value as $headersIndex => $headers) { foreach ($headers as $headerKey => $headerValue) { if ($headerKey == 'header_fields') { unpackHeaderFields($headerValue, $t . "\t"); } elseif (in_array($headerKey, ['boxes', 'line_items'])) { echo "$t$headersIndex : $headerKey...\n"; foreach ($headerValue as $subIndex => $subValue) { echo "$t\t$subValue\n"; } } else { echo "$t$headersIndex : $headerKey = $headerValue\n"; } } } } $array = json_decode($json, true); foreach ($array['data'] as $index => $data) { foreach ($data as $key => $value) { if ($key == 'header_fields') { echo "$index : header_fields...\n"; unpackHeaderFields($value); } elseif ($key == 'boxes') { echo "$index : boxes...\n"; foreach ($value as $boxIndex => $boxValue) { echo "\t$boxValue\n"; } } else { echo "$index : $key = $value\n"; } } } echo 'meta count = ' . $array['meta']['count'];

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.70.0120.00616.88
8.5.60.0090.00816.75
8.5.50.0120.00516.66
8.5.30.0110.00917.71
8.5.20.0100.00820.21
8.5.10.0170.00516.63
8.5.00.0140.00820.04
8.4.220.0140.00719.59
8.4.210.0030.00619.55
8.4.180.0130.00723.79
8.4.170.0130.00722.04
8.4.160.0140.00925.51
8.4.150.0080.00416.91
8.4.140.0140.00817.39
8.4.130.0140.00717.88
8.4.120.0140.00620.53
8.4.110.0090.01120.75
8.4.100.0040.00418.83
8.4.90.0070.00220.91
8.4.80.0040.00518.77
8.4.70.0090.01218.07
8.4.60.0110.01018.94
8.4.50.0130.00819.62
8.4.40.0070.00317.90
8.4.30.0140.00718.73
8.4.20.0070.01317.77
8.4.10.0090.00922.38
8.3.310.0080.01020.23
8.3.300.0120.01020.54
8.3.290.0100.01020.88
8.3.280.0130.00818.57
8.3.270.0110.00916.44
8.3.260.0130.00616.71
8.3.250.0110.00818.99
8.3.240.0100.01016.39
8.3.230.0140.00616.49
8.3.220.0160.00318.85
8.3.210.0090.00916.48
8.3.200.0060.00416.60
8.3.190.0100.01017.22
8.3.180.0090.00716.48
8.3.170.0050.00316.48
8.3.160.0120.00617.05
8.3.150.0080.00017.33
8.3.140.0150.00416.59
8.3.130.0060.00316.91
8.3.120.0090.00020.61
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0080.00026.77
8.3.80.0030.00719.36
8.3.70.0110.00418.30
8.3.60.0150.00016.50
8.3.50.0180.00223.57
8.3.40.0040.01519.07
8.3.30.0110.00418.67
8.3.20.0090.00024.18
8.3.10.0030.00524.66
8.3.00.0000.00826.16
8.2.310.0100.01118.07
8.2.300.0140.00717.93
8.2.290.0120.00620.28
8.2.280.0150.00518.25
8.2.270.0120.00317.30
8.2.260.0120.00616.48
8.2.250.0080.00016.69
8.2.240.0040.00417.05
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0070.01026.77
8.2.200.0100.00018.88
8.2.190.0160.00616.58
8.2.180.0180.00425.92
8.2.170.0100.01022.96
8.2.160.0110.00822.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00719.95
8.2.110.0030.00619.37
8.2.100.0070.00717.63
8.2.90.0070.00319.34
8.2.80.0000.00817.97
8.2.70.0030.00517.50
8.2.60.0060.00617.50
8.2.50.0080.00019.34
8.2.40.0000.00819.32
8.2.30.0040.00419.36
8.2.20.0070.00018.05
8.2.10.0050.00320.96
8.2.00.0080.00019.34
8.1.340.0070.00217.74
8.1.330.0080.00321.94
8.1.320.0100.00918.06
8.1.310.0060.00317.05
8.1.300.0090.00618.20
8.1.290.0060.00330.84
8.1.280.0040.01825.92
8.1.270.0060.00323.99
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0040.00819.20
8.1.230.0070.00417.76
8.1.220.0090.00017.77
8.1.210.0030.00518.77
8.1.200.0070.00317.36
8.1.190.0000.00817.13
8.1.180.0000.00819.08
8.1.170.0090.00018.64
8.1.160.0000.00819.02
8.1.150.0000.00718.93
8.1.140.0000.00719.02
8.1.130.0040.00420.25
8.1.120.0040.00417.49
8.1.110.0000.00817.38
8.1.100.0040.00417.49
8.1.90.0050.00317.39
8.1.80.0000.00917.49
8.1.70.0080.00017.50
8.1.60.0040.00417.63
8.1.50.0090.00017.63
8.1.40.0000.00917.48
8.1.30.0030.00517.71
8.1.20.0060.00317.66
8.1.10.0030.00617.60
8.1.00.0030.00617.52
8.0.300.0000.00718.77
8.0.290.0050.00216.88
8.0.280.0040.00418.48
8.0.270.0040.00416.86
8.0.260.0000.00618.53
8.0.250.0050.00217.02
8.0.240.0040.00416.98
8.0.230.0030.00316.91
8.0.220.0000.00716.83
8.0.210.0040.00416.90
8.0.200.0000.00617.00
8.0.190.0020.00517.04
8.0.180.0060.00316.92
8.0.170.0060.00316.91
8.0.160.0050.00316.95
8.0.150.0000.00816.91
8.0.140.0030.00516.92
8.0.130.0000.00613.41
8.0.120.0080.00016.93
8.0.110.0080.00016.88
8.0.100.0070.00016.91
8.0.90.0040.00416.93
8.0.80.0070.00916.93
8.0.70.0040.00416.89
8.0.60.0040.00416.89
8.0.50.0080.00017.04
8.0.30.0100.00717.03
8.0.20.0110.00917.30
8.0.10.0040.00417.04
8.0.00.0170.01016.83
7.4.330.0030.00315.55
7.4.320.0000.00716.66
7.4.300.0000.00616.59
7.4.290.0030.00316.55
7.4.280.0080.00016.55
7.4.270.0020.00516.59
7.4.260.0000.00716.66
7.4.250.0000.00716.59
7.4.240.0000.00716.48
7.4.230.0030.00516.58
7.4.220.0030.00316.70
7.4.210.0080.00916.60
7.4.200.0040.00416.55
7.4.130.0080.01116.56
7.4.120.0130.01516.52
7.4.110.0110.01116.65
7.4.100.0070.01116.57
7.4.90.0060.01216.50
7.4.80.0120.00619.39
7.4.70.0090.00916.62
7.4.60.0070.01316.33
7.4.50.0080.01616.27
7.4.40.0090.00916.42
7.4.30.0100.00716.47
7.4.20.0110.00716.41
7.4.10.0150.00916.48
7.4.00.0100.01016.45
7.3.330.0000.00716.38
7.3.320.0050.00313.22
7.3.310.0020.00516.44
7.3.300.0030.00316.32
7.3.290.0060.00816.38
7.3.260.0060.01816.49
7.3.240.0110.00716.55
7.3.230.0090.00916.53
7.3.210.0040.01316.55
7.3.200.0100.00716.57
7.3.190.0100.00916.57
7.3.180.0060.01216.56
7.3.170.0030.01616.36
7.3.160.0070.01016.29
7.3.150.0100.00716.52
7.3.140.0110.01116.38
7.3.130.0130.01016.36
7.3.120.0060.01616.36
7.3.110.0040.01516.37
7.3.100.0080.01216.53
7.3.90.0160.00016.49
7.3.80.0060.01616.14
7.3.70.0130.01116.29
7.3.60.0080.01316.37
7.3.50.0090.01216.31
7.3.40.0100.00916.35
7.3.30.0140.01116.22
7.3.20.0120.01216.41
7.3.10.0150.01216.34
7.3.00.0090.01216.47
7.2.330.0150.00916.87
7.2.320.0150.00616.58
7.2.310.0080.01116.64
7.2.300.0060.01216.59
7.2.290.0120.00916.48
7.2.280.0070.01116.60
7.2.270.0120.00916.61
7.2.260.0070.01016.68
7.2.250.0110.01116.54
7.2.240.0100.01116.64
7.2.230.0100.01016.69
7.2.220.0130.00816.49
7.2.210.0090.00916.71
7.2.200.0170.00816.88
7.2.190.0080.01416.47
7.2.180.0230.00016.61
7.2.170.0100.01416.70
7.2.160.0200.00416.63
7.2.150.0160.01016.54
7.2.140.0120.01216.75
7.2.130.0060.02316.54
7.2.120.0640.00316.64
7.2.110.0150.00716.75
7.2.100.0160.01516.61
7.2.90.0110.01616.50
7.2.80.0200.00716.57
7.2.70.0080.01616.60
7.2.60.0100.01016.76
7.2.50.0160.00916.77
7.2.40.0110.01216.71
7.2.30.0100.01016.83
7.2.20.0100.01016.68
7.2.10.0120.01216.57
7.2.00.0030.02116.57

preferences:
369.85 ms | 2115 KiB | 5 Q