3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"> <channel> <title>mMin title</title> <description>Some description</description> <managingEditor>john.doe@example.com</managingEditor> <category>Some category</category> <item> <guid isPermaLink="false">1</guid> <link>https://example.com/1</link> <title>Some title 1</title> <a10:updated>2017-05-30T13:20:22+02:00</a10:updated> <a10:content type="text/xml"> <Location>San diego</Location> <PublishedOn>2016-10-21T11:21:07</PublishedOn> <Body>Lorem ipsum dolar</Body> <JobCountry>USA</JobCountry> </a10:content> </item> <item> <guid isPermaLink="false">1</guid> <link>https://example.com/2</link> <title>Some title 2</title> <a10:updated>2017-05-30T13:20:22+02:00</a10:updated> <a10:content type="text/xml"> <Location>Detroit</Location> <PublishedOn>2016-10-21T11:21:07</PublishedOn> <Body>Lorem ipsum dolar</Body> <JobCountry>USA</JobCountry> </a10:content> </item> <item> <guid isPermaLink="false">1</guid> <link>https://example.com/3</link> <title>Some title 3</title> <a10:updated>2017-05-30T13:20:22+02:00</a10:updated> <a10:content type="text/xml"> <Location>Los Angeles</Location> <PublishedOn>2016-10-21T11:21:07</PublishedOn> <Body>Lorem ipsum dolar</Body> <JobCountry>USA</JobCountry> </a10:content> </item> </channel> </rss>'; function domToArray($item, array $cols) { $array = []; foreach ($cols as $col) { $val = $item->getElementsByTagName($col)->item(0)->nodeValue; $array[$col] = $val; } return $array; } $dom = new DOMDocument(); $dom->loadXML($xml); $items = $dom->getElementsByTagName('item'); $array = array(); $fields = [ 'title', 'link', 'updated', 'Location', 'PublishedOn', 'Body', 'JobCountry', ]; foreach($items as $item) { $array[] = domToArray($item, $fields); } var_dump($array);

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.30.0090.01019.70
8.5.20.0120.00620.48
8.5.10.0090.01217.09
8.5.00.0130.00920.45
8.4.180.0110.01119.87
8.4.170.0170.00524.22
8.4.160.0150.01022.50
8.4.150.0080.00617.00
8.4.140.0100.01318.00
8.4.130.0100.00617.77
8.4.120.0090.01220.66
8.4.110.0070.00920.84
8.4.100.0060.01018.04
8.4.90.0110.01017.83
8.4.80.0090.00619.91
8.4.70.0080.01317.96
8.4.60.0120.00518.88
8.4.50.0110.01119.76
8.4.40.0130.00617.70
8.4.30.0090.00919.68
8.4.20.0200.00017.80
8.4.10.0040.00417.79
8.3.300.0080.01320.93
8.3.290.0120.00821.14
8.3.280.0100.01118.79
8.3.270.0120.00816.82
8.3.260.0080.00216.87
8.3.250.0120.00719.15
8.3.240.0150.00516.60
8.3.230.0130.00716.87
8.3.220.0120.00716.78
8.3.210.0090.00616.84
8.3.200.0030.00716.81
8.3.190.0070.01117.30
8.3.180.0070.00316.80
8.3.170.0180.00017.33
8.3.160.0040.01518.55
8.3.150.0070.01317.04
8.3.140.0030.00617.43
8.3.130.0120.00918.79
8.3.120.0030.00621.15
8.3.110.0060.00320.94
8.3.100.0050.00518.81
8.3.90.0050.00326.77
8.3.80.0030.00619.36
8.3.70.0100.00716.88
8.3.60.0120.00316.75
8.3.50.0140.00517.44
8.3.40.0180.00019.04
8.3.30.0120.00319.10
8.3.20.0040.00421.91
8.3.10.0040.00422.16
8.3.00.0040.00419.51
8.2.300.0140.00622.41
8.2.290.0060.00920.67
8.2.280.0100.00418.63
8.2.270.0130.00317.66
8.2.260.0090.00018.59
8.2.250.0060.00317.05
8.2.240.0060.01217.72
8.2.230.0040.00822.58
8.2.220.0030.00624.06
8.2.210.0190.00026.77
8.2.200.0030.00618.88
8.2.190.0120.00918.76
8.2.180.0100.01316.88
8.2.170.0140.00722.96
8.2.160.0070.01019.54
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00820.64
8.2.120.0040.00426.35
8.2.110.0030.00722.47
8.2.100.0060.00620.53
8.2.90.0030.00718.47
8.2.80.0040.00418.18
8.2.70.0050.00318.18
8.2.60.0080.00018.34
8.2.50.0000.00818.18
8.2.40.0040.00420.86
8.2.30.0050.00319.63
8.2.20.0040.00418.30
8.2.10.0050.00318.32
8.2.00.0040.00418.33
8.1.340.0110.01221.92
8.1.330.0120.00816.90
8.1.320.0110.00816.41
8.1.310.0070.01118.81
8.1.300.0110.00718.69
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0050.00520.98
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00024.04
8.1.230.0060.00619.28
8.1.220.0040.00417.80
8.1.210.0060.00618.77
8.1.200.0070.00317.60
8.1.190.0060.00317.47
8.1.180.0040.00418.10
8.1.170.0000.00918.76
8.1.160.0000.00819.06
8.1.150.0000.00719.15
8.1.140.0040.00419.66
8.1.130.0000.00819.12
8.1.120.0080.00017.74
8.1.110.0040.00417.57
8.1.100.0030.00617.76
8.1.90.0040.00417.63
8.1.80.0000.00717.74
8.1.70.0040.00417.56
8.1.60.0060.00317.87
8.1.50.0000.00917.77
8.1.40.0030.00617.80
8.1.30.0030.00517.75
8.1.20.0030.00617.70
8.1.10.0090.00017.71
8.1.00.0040.00417.84
8.0.300.0030.00519.96
8.0.290.0040.00417.00
8.0.280.0070.00018.68
8.0.270.0000.00816.95
8.0.260.0000.00717.36
8.0.250.0070.00017.22
8.0.240.0060.00317.08
8.0.230.0040.00417.02
8.0.220.0070.00017.09
8.0.210.0030.00316.99
8.0.200.0030.00317.18
8.0.190.0030.00517.06
8.0.180.0080.00017.08
8.0.170.0080.00317.03
8.0.160.0080.00017.13
8.0.150.0040.00417.12
8.0.140.0040.00416.88
8.0.130.0050.00013.46
8.0.120.0040.00416.96
8.0.110.0030.00517.20
8.0.100.0030.00617.13
8.0.90.0000.00717.07
8.0.80.0120.00617.10
8.0.70.0050.00317.02
8.0.60.0040.00417.21
8.0.50.0000.00716.96
8.0.30.0150.00717.38
8.0.20.0150.01017.45
8.0.10.0000.00817.16
8.0.00.0090.00916.82
7.4.330.0050.00015.55
7.4.320.0000.00616.73
7.4.300.0020.00516.73
7.4.290.0030.00316.83
7.4.280.0040.00416.84
7.4.270.0000.00716.75
7.4.260.0000.00716.79
7.4.250.0000.00716.79
7.4.240.0000.00716.89
7.4.230.0000.00716.91
7.4.220.0190.00616.72
7.4.210.0110.00716.81
7.4.200.0070.00016.82
7.4.160.0090.00816.76
7.4.150.0160.00517.40
7.4.140.0120.01217.86
7.4.130.0090.01116.77
7.4.120.0100.01316.89
7.4.110.0100.01016.64
7.4.100.0120.00816.82
7.4.90.0110.00716.82
7.4.80.0070.01119.39
7.4.70.0170.00016.80
7.4.60.0060.01016.69
7.4.50.0040.01116.55
7.4.40.0100.00716.50
7.4.30.0030.01816.69
7.4.00.0030.01314.74
7.3.330.0030.00313.57
7.3.320.0000.00513.40
7.3.310.0000.00716.64
7.3.300.0000.00716.59
7.3.290.0000.00716.48
7.3.280.0100.00716.57
7.3.270.0100.01317.40
7.3.260.0110.01016.70
7.3.250.0110.00816.61
7.3.240.0100.00916.78
7.3.230.0100.00716.84
7.3.210.0130.00616.65
7.3.200.0070.01116.69
7.3.190.0050.01816.70
7.3.180.0160.00316.66
7.3.170.0120.00816.51
7.3.160.0120.01216.91
7.3.10.0060.00616.73
7.3.00.0090.00616.80
7.2.330.0060.01216.76
7.2.320.0120.01216.72
7.2.310.0110.00816.87
7.2.300.0090.01216.86
7.2.290.0110.00617.00
7.2.130.0070.00717.05
7.2.120.0070.01017.18
7.2.110.0070.00716.84
7.2.100.0030.00617.03
7.2.90.0040.00816.98
7.2.80.0070.00716.79
7.2.70.0040.01117.06
7.2.60.0030.01017.01
7.2.50.0100.00617.26
7.2.40.0030.00616.88
7.2.30.0000.01416.82
7.2.20.0030.01016.95
7.2.10.0030.01017.00
7.2.00.0100.00316.81
7.1.250.0060.00315.86
7.1.70.0040.00417.28
7.1.60.0030.00917.47
7.1.50.1370.01032.93
7.1.40.1230.01732.64
7.1.30.1070.01032.66
7.1.20.0900.02032.77
7.1.10.0700.01314.86
7.1.00.0770.00014.91
7.0.200.0120.00616.78
7.0.190.2070.01314.75
7.0.180.1000.02014.38
7.0.170.1100.00314.51
7.0.160.1100.00714.49
7.0.150.0630.00714.61
7.0.140.0900.01014.56
7.0.130.0530.01314.79
7.0.120.0770.01014.80
7.0.110.0530.00714.70
7.0.100.0570.00714.45
7.0.90.0830.00714.54
7.0.80.0630.01714.45
7.0.70.0830.01714.55
7.0.60.0700.01714.36
7.0.50.0730.00714.71
7.0.40.0530.01014.70
7.0.30.0600.00714.79
7.0.20.0670.01014.66
7.0.10.0430.01014.67
7.0.00.0730.00714.78

preferences:
61.63 ms | 1791 KiB | 5 Q