3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * How to get attribute of node with namespace using SimpleXML? * * @link http://stackoverflow.com/q/6576773/367456 */ $buffer = '<item><title>Paul Priestman at Gateshead College</title><pubDate>Tue, 15 Dec 2015 05:21:31 -0500</pubDate><link>https://vimeo.com/148993338</link><description>&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/148993338&quot; width=&quot;640&quot; height=&quot;360&quot;frameborder=&quot;0&quot; title=&quot;Paul Priestman at Gateshead College&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;&lt;p class=&quot;first&quot;&gt;Paul Priestman, Designer &amp; Co-Director of PriestmanGoode, visited Gateshead College for a talk as part of the Speakers for Schools program. This video has been provided courtesy of Steven Chippendale, from the school.&lt;/p&gt; &lt;p&gt;Speakers for Schools is an independent UK charity that provides state secondary schools with access to talks from high-profile professionals and academics. Our speakers are experts and leaders in their fields: some of the countrys highest achieving individuals across government, business, sport, technology, science and the arts, donating their time to share their insights and experiences. For more information visit our website at speakers4schools.org&lt;/p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Cast:&lt;/strong&gt; &lt;a href=&quot;https://vimeo.com/user29751154&quot;&gt;Speakers for Schools&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; &lt;a href=&quot;https://vimeo.com/tag:business&quot;&gt;business&lt;/a&gt;, &lt;a href=&quot;https://vimeo.com/tag:Gateshead&quot;&gt;Gateshead&lt;/a&gt;, &lt;a href=&quot;https://vimeo.com/tag:Paul+Priestman&quot;&gt;Paul Priestman&lt;/a&gt;, &lt;a href=&quot;https://vimeo.com/tag:design&quot;&gt;design&lt;/a&gt; and &lt;a href=&quot;https://vimeo.com/tag:Gateshead+College&quot;&gt;Gateshead College&lt;/a&gt;&lt;/p&gt;</description><guid isPermaLink="false">tag:vimeo,2015-12-15:clip148993338</guid><media:content><media:player url="https://player.vimeo.com/video/148993338"/><media:credit role="author" scheme="https://vimeo.com/user29751154"></media:credit><media:thumbnail height="540" width="960" url="https://i.vimeocdn.com/video/548100055_960.jpg"/><media:title>Paul Priestman at Gateshead College</media:title></media:content></item>'; $xml = new SimpleXMLElement($buffer); if (!defined('LIBXML_DOTTED_VERSION')) { echo "PHP/LIBXML unsupported/too old."; return; } echo "ibxml version: ", LIBXML_DOTTED_VERSION, "\n"; $youtube = $xml; echo 'tests: ', $youtube->rss->channel->item, "\n"; echo 'via attributes(): ', $youtube->children('media', TRUE)->content, "\n"; echo 'via array-access: ', $youtube->children('media', TRUE)->content, "\n"; echo 'via property : ', $youtube->children('media', TRUE)->content, "\n";

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.60.0090.00618.80
8.3.50.0000.01719.82
8.3.40.0120.00619.09
8.3.30.0070.00719.04
8.3.20.0040.00420.67
8.3.10.0000.00820.74
8.3.00.0050.00321.09
8.2.180.0040.01417.13
8.2.170.0100.00622.96
8.2.160.0090.00622.46
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00819.81
8.2.110.0030.00622.68
8.2.100.0080.00419.76
8.2.90.0060.00318.00
8.2.80.0050.00518.98
8.2.70.0040.00418.00
8.2.60.0030.00517.88
8.2.50.0040.00418.07
8.2.40.0040.00418.47
8.2.30.0030.00618.32
8.2.20.0050.00317.93
8.2.10.0040.00418.22
8.2.00.0030.00718.34
8.1.280.0130.00325.92
8.1.270.0120.00624.07
8.1.260.0040.00426.35
8.1.250.0110.00328.09
8.1.240.0040.00420.97
8.1.230.0090.00317.95
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0080.00017.50
8.1.190.0120.00017.35
8.1.180.0060.00318.10
8.1.170.0050.00518.70
8.1.160.0030.00619.14
8.1.150.0000.00718.96
8.1.140.0030.00519.90
8.1.130.0040.00417.84
8.1.120.0040.00417.69
8.1.110.0030.00517.56
8.1.100.0030.00517.53
8.1.90.0040.00417.70
8.1.80.0040.00417.55
8.1.70.0000.00717.75
8.1.60.0050.00317.70
8.1.50.0000.00917.62
8.1.40.0030.00717.75
8.1.30.0040.00717.69
8.1.20.0000.00817.87
8.1.10.0030.00517.78
8.1.00.0000.00817.86
8.0.300.0030.00620.80
8.0.290.0050.00317.13
8.0.280.0040.00418.70
8.0.270.0040.00417.60
8.0.260.0000.00717.59
8.0.250.0030.00317.12
8.0.240.0000.00717.24
8.0.230.0040.00417.08
8.0.220.0040.00317.05
8.0.210.0040.00417.22
8.0.200.0030.00317.23
8.0.190.0080.00017.22
8.0.180.0040.00417.18
8.0.170.0000.00817.05
8.0.160.0030.00517.12
8.0.150.0030.00516.95
8.0.140.0040.00417.22
8.0.130.0000.00613.67
8.0.120.0000.00817.15
8.0.110.0070.00016.94
8.0.100.0040.00417.16
8.0.90.0030.00517.00
8.0.80.0030.01417.04
8.0.70.0000.00717.13
8.0.60.0050.00217.16
8.0.50.0000.00817.05
8.0.30.0080.01017.18
8.0.20.0130.01017.40
8.0.10.0050.00317.21
8.0.00.0100.00816.89
7.4.330.0020.00217.15
7.4.320.0030.00316.59
7.4.300.0030.00316.68
7.4.290.0040.00316.84
7.4.280.0040.00416.76
7.4.270.0000.00716.86
7.4.260.0000.00816.68
7.4.250.0050.00316.68
7.4.240.0000.00716.61
7.4.230.0000.00716.82
7.4.220.0070.01416.89
7.4.210.0130.00316.84
7.4.200.0000.00816.83
7.4.160.0100.00616.62
7.4.150.0120.00917.40
7.4.140.0080.00817.86
7.4.130.0110.00716.84
7.4.120.0110.00916.82
7.4.110.0040.01516.79
7.4.100.0160.00016.76
7.4.90.0090.00816.84
7.4.80.0060.01019.39
7.4.70.0060.01316.80
7.4.60.0030.01416.64
7.4.50.0100.00316.85
7.4.40.0070.01116.67
7.4.30.0000.01716.79
7.4.00.0090.00815.10
7.3.330.0000.00513.29
7.3.320.0050.00213.22
7.3.310.0000.00716.63
7.3.300.0040.00416.43
7.3.290.0050.01216.50
7.3.280.0070.01016.57
7.3.270.0120.00617.40
7.3.260.0200.01316.71
7.3.240.0070.01016.63
7.3.230.0150.00316.59
7.3.210.0140.00316.60
7.3.200.0160.00616.58
7.3.190.0030.01416.57
7.3.180.0120.00416.66
7.3.170.0100.00716.61
7.3.160.0090.00616.70
7.3.120.0070.00915.04
7.3.110.0080.00915.00
7.3.100.0060.00915.00
7.3.90.0100.00614.93
7.3.80.0060.00714.92
7.3.70.0050.00814.89
7.3.60.0060.00914.80
7.3.50.0080.00514.82
7.3.40.0040.01014.70
7.3.30.0050.00814.92
7.3.20.0060.00716.67
7.3.10.0040.00916.79
7.3.00.0070.00816.77
7.2.330.0090.00916.63
7.2.320.0100.01016.95
7.2.310.0030.01516.96
7.2.300.0100.01316.98
7.2.290.0090.00916.68
7.2.250.0030.01515.17
7.2.240.0100.00915.23
7.2.230.0060.00715.18
7.2.220.0080.00615.12
7.2.210.0040.00915.14
7.2.200.0090.00515.10
7.2.190.0060.00714.90
7.2.180.0060.00815.03
7.2.170.0070.00815.09
7.2.160.0070.01015.33
7.2.150.0070.01016.82
7.2.140.0100.00716.84
7.2.130.0000.01716.77
7.2.120.0060.01216.71
7.2.110.0070.00717.06
7.2.100.0030.01316.82
7.2.90.0100.00716.88
7.2.80.0090.00616.65
7.2.70.0060.01217.11
7.2.60.0030.01316.99
7.2.50.0030.00916.81
7.2.40.0040.01416.89
7.2.30.0030.01317.11
7.2.20.0030.01516.68
7.2.10.0100.00316.85
7.2.00.0110.00818.25
7.1.330.0030.01115.81
7.1.320.0060.00915.83
7.1.310.0060.00415.80
7.1.300.0080.00715.67
7.1.290.0060.00815.88
7.1.280.0050.01115.75
7.1.270.0050.00915.93
7.1.260.0040.00915.74
7.1.250.0000.01115.53
7.1.200.0070.00715.70
7.1.100.0040.00718.17
7.1.70.0040.00417.02
7.1.60.0070.01719.61
7.1.50.0100.01317.09
7.1.00.0130.06722.49
7.0.200.0080.00016.96
7.0.60.0330.06020.14
7.0.50.0000.04318.08
7.0.40.0070.04020.43
7.0.30.0330.04020.22
7.0.20.0300.07720.21
7.0.10.0070.08320.31
7.0.00.0030.04320.38
5.6.280.0100.07721.01
5.6.210.0030.07320.63
5.6.200.0100.08018.27
5.6.190.0070.07320.86
5.6.180.0230.06020.50
5.6.170.0270.05020.53
5.6.160.0070.05720.55
5.6.150.0030.08318.20
5.6.140.0070.08318.20
5.6.130.0070.08318.30
5.6.120.0030.08321.20
5.6.110.0030.08321.02
5.6.100.0100.05321.18
5.6.90.0100.07721.17
5.6.80.0070.07320.52
5.5.350.3430.03720.59
5.5.340.0030.07318.00
5.5.330.0170.07320.33
5.5.320.0200.05020.41
5.5.310.0400.06020.43
5.5.300.0070.05018.05
5.5.290.0130.07018.00
5.5.280.0170.07320.77
5.5.270.0100.08020.94
5.5.260.0070.04720.84
5.5.250.0030.04020.82
5.5.240.0070.06720.33

preferences:
55.29 ms | 401 KiB | 5 Q