3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "result": { "LabelNumber": "oa0021148274", "Scans": [{ "Type": "P", "Courier": "020", "Description": "Picked up", "Date": "06/11/2014 18:58:14", "Name": "Cape Town", "Franchise": "CPT", "Status": "PPP", "StatusDescription": "Your parcel was picked up", "CompanyInfo": { "contactName": "", "company": "", "address1": "", "address2": "", "address3": "", "address4": "", "address5": "", "address6": "", "address7": "", "address8": "", "comment": "" }, "UploadDate": "07/11/2014", "Signature": "" }, { "Type": "T", "Courier": "020", "Description": "Pretoria", "Date": "06/11/2014 19:04:30", "Name": "Cape Town", "Franchise": "CPT", "Status": "PRY", "StatusDescription": "Your parcel is currently in transit between our depots.", "CompanyInfo": { "contactName": "", "company": "", "address1": "", "address2": "", "address3": "", "address4": "", "address5": "", "address6": "", "address7": "", "address8": "", "comment": "" }, "UploadDate": "07/11/2014", "Signature": "" }, { "Type": "T", "Courier": "011", "Description": "Pretoria Depot Scan ", "Date": "10/11/2014 06:56:34", "Name": "Pretoria", "Franchise": "PRY", "Status": "O01", "StatusDescription": "Your parcel has been received in the Pretoria depot.", "CompanyInfo": { "contactName": "", "company": "", "address1": "", "address2": "", "address3": "", "address4": "", "address5": "", "address6": "", "address7": "", "address8": "", "comment": "" }, "UploadDate": "10/11/2014", "Signature": "" }, { "Type": "T", "Courier": "013", "Description": "Onboard", "Date": "10/11/2014 07:51:19", "Name": "Pretoria", "Franchise": "PRY", "Status": "ONB", "StatusDescription": "Onboard - the parcel is onboard the Courier vehicle.", "CompanyInfo": { "contactName": "", "company": "Home Delivery", "address1": "44 suikerbos", "address2": "lydiana", "address3": "o", "address4": "", "address5": "", "address6": "", "address7": "", "address8": "", "comment": "" }, "UploadDate": "10/11/2014", "Signature": "" }, { "Type": "D", "Courier": "013", "Description": "Signature Obtained", "Date": "10/11/2014 09:47:05", "Name": "Pretoria", "Franchise": "PRY", "Status": "YES", "StatusDescription": "Signature Obtained - Your parcel has been delivered and signed for.", "CompanyInfo": { "contactName": "philimon", "company": "Home Delivery", "address1": "44 suikerbos", "address2": "lydiana", "address3": "o", "address4": "", "address5": "", "address6": "", "address7": "", "address8": "", "comment": "" }, "UploadDate": "10/11/2014", "Signature": "http://api.fastway.org/signatures/0312408478f58b8b1d685a148089960f.jpg" }], "Signature": "http://api.fastway.org/signatures/0312408478f58b8b1d685a148089960f.jpg", "DistributedTo": "Cape Town ", "DistributedDate": "8/08/2014", "Reference": "", "IsOnforward": "0" }, "generated_in": "155ms" }'; function array2xml($array, $xml = false){ if($xml === false){ $xml = new SimpleXMLElement('<result/>'); } foreach($array as $key => $value){ if(is_array($value)){ array2xml($value, $xml->addChild($key)); } else { $xml->addChild($key, $value); } } return $xml; } $data = array2xml(json_decode($json, true), false); var_dump($data);

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.80.0030.00716.75
8.3.70.0110.00716.88
8.3.60.0140.00316.98
8.3.50.0150.00822.18
8.3.40.0170.00718.54
8.3.30.0130.00318.71
8.3.20.0030.00618.58
8.3.10.0090.00021.98
8.3.00.0080.00022.20
8.2.200.0070.00317.13
8.2.190.0170.00316.75
8.2.180.0150.00925.92
8.2.170.0040.01422.96
8.2.160.0190.00022.41
8.2.150.0050.00524.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0060.00320.95
8.2.110.0100.00022.49
8.2.100.0100.00318.03
8.2.90.0070.00717.88
8.2.80.0060.00317.97
8.2.70.0080.00018.15
8.2.60.0040.00418.29
8.2.50.0040.00419.52
8.2.40.0060.00320.63
8.2.30.0080.00021.07
8.2.20.0030.00618.23
8.2.10.0080.00018.25
8.2.00.0080.00017.94
8.1.290.0030.00730.84
8.1.280.0130.00325.92
8.1.270.0060.00323.94
8.1.260.0090.00026.35
8.1.250.0060.00328.09
8.1.240.0080.00419.14
8.1.230.0000.01321.11
8.1.220.0060.00317.91
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0030.00618.79
8.1.160.0060.00323.98
8.1.150.0040.00419.06
8.1.140.0000.00819.77
8.1.130.0020.00517.94
8.1.120.0000.00817.73
8.1.110.0000.00917.57
8.1.100.0000.00817.70
8.1.90.0000.00917.69
8.1.80.0030.00517.64
8.1.70.0080.00017.68
8.1.60.0040.00417.80
8.1.50.0060.00317.61
8.1.40.0000.00817.70
8.1.30.0080.00417.96
8.1.20.0000.00817.80
8.1.10.0000.00817.77
8.1.00.0030.00617.63
8.0.300.0050.00318.77
8.0.290.0040.00416.88
8.0.280.0080.00018.77
8.0.270.0040.00416.94
8.0.260.0030.00317.36
8.0.250.0030.00417.10
8.0.240.0040.00417.18
8.0.230.0000.00917.13
8.0.220.0040.00417.13
8.0.210.0040.00417.04
8.0.200.0070.00017.13
8.0.190.0040.00417.05
8.0.180.0000.00817.07
8.0.170.0030.00617.00
8.0.160.0000.00817.26
8.0.150.0080.00017.03
8.0.140.0040.00417.13
8.0.130.0070.00013.57
8.0.120.0000.00817.11
8.0.110.0040.00417.18
8.0.100.0000.00816.92
8.0.90.0030.00516.98
8.0.80.0110.00517.12
8.0.70.0040.00417.16
8.0.60.0080.00317.01
8.0.50.0040.00417.12
8.0.30.0120.00917.09
8.0.20.0140.00917.40
8.0.10.0000.01017.14
8.0.00.0170.00717.04
7.4.330.0030.00315.55
7.4.320.0000.00716.59
7.4.300.0040.00416.83
7.4.290.0050.00316.66
7.4.280.0000.00916.72
7.4.270.0030.00516.71
7.4.260.0050.00316.74
7.4.250.0030.00616.68
7.4.240.0060.00316.70
7.4.230.0050.00316.79
7.4.220.0130.01416.73
7.4.210.0070.01016.76
7.4.200.0000.00716.58
7.4.160.0070.01216.84
7.4.150.0150.00717.40
7.4.140.0150.00717.86
7.4.130.0220.00716.78
7.4.120.0210.00516.70
7.4.110.0310.00316.61
7.4.100.0120.01216.75
7.4.90.0080.01616.71
7.4.80.0100.01419.39
7.4.70.0140.00616.66
7.4.60.0140.00616.80
7.4.50.0030.01316.40
7.4.40.0030.01716.66
7.4.30.0120.01216.74
7.4.00.0070.01015.09
7.3.330.0060.00013.58
7.3.320.0030.00313.43
7.3.310.0000.00716.58
7.3.300.0040.00416.50
7.3.290.0080.00916.59
7.3.280.0110.01116.56
7.3.270.0070.01417.40
7.3.260.0140.01116.60
7.3.250.0160.00816.69
7.3.240.0180.01116.69
7.3.230.0060.01516.75
7.3.210.0090.01216.86
7.3.200.0100.01016.84
7.3.190.0080.01416.65
7.3.180.0070.01416.47
7.3.170.0200.00016.68
7.3.160.0070.01416.84
7.2.330.0150.00616.88
7.2.320.0200.01016.91
7.2.310.0080.01716.91
7.2.300.0160.01317.02
7.2.290.0070.01416.73
7.2.60.0040.01117.26
7.2.00.0030.01019.40
7.1.200.0030.01016.01
7.1.70.0030.00917.07
7.1.60.0000.01117.06
7.1.00.0030.07322.54
7.0.200.0480.00314.80
7.0.120.0170.05722.09
7.0.110.0130.06022.27
7.0.100.0170.05322.10
7.0.90.0170.06722.20
7.0.80.0130.05721.99
7.0.70.0200.06022.09
7.0.60.0200.05022.36
7.0.50.0130.05722.07
7.0.40.0300.03722.12
7.0.30.0100.05722.13
7.0.20.0070.07322.09
7.0.10.0130.05322.13
7.0.00.0170.05322.13
5.6.270.0100.06021.03
5.6.260.0200.05021.18
5.6.250.0170.05321.08
5.6.240.0130.07021.09
5.6.230.0170.07020.96
5.6.220.0170.05720.99
5.6.210.0100.06020.99
5.6.200.0070.06321.15
5.6.190.0200.05321.04
5.6.180.0100.06721.14
5.6.170.0100.05721.01
5.6.160.0230.04721.01
5.6.150.0130.05721.01
5.6.140.0230.05320.94
5.6.130.0170.05321.01
5.6.120.0170.05021.01
5.6.110.0100.07721.10
5.6.100.0130.06721.00
5.6.90.0200.05020.99
5.6.80.0070.06020.40
5.6.70.0000.06720.31
5.6.60.0130.05020.35
5.6.50.0170.06320.42
5.6.40.0170.07020.25
5.6.30.0130.06020.40
5.6.20.0170.05020.45
5.6.10.0100.05320.25
5.6.00.0070.05720.41

preferences:
73.27 ms | 401 KiB | 5 Q