3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = '<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0"> <channel> <title>Breaking News - Racer X Online</title> <link>http://racerxonline.com/</link> <description> Racer X Online is the world\'s top source for breaking motocross and supercross news. </description> <lastBuildDate>Thu, 09 Apr 2015 02:07:26 -0400</lastBuildDate> <ttl>10</ttl> <language>En</language> <atom:link href="http://racerxonline.com/feeds/rss/category/breaking-news" rel="self" type="application/rss+xml"/> <copyright>Copyright 2015 - Racer X Online</copyright> <image> <link>http://racerxonline.com/</link> <title>Breaking News - Racer X Online</title> <url>http://rx.iscdn.net/i/logos/racer-x-thumb.png</url> </image> <item> <title>Houston Animated Track Map</title> <link> http://racerxonline.com/2015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source=Feed&utm_campaign=Breaking+News+-+Racer+X+Online </link> <guid> http://racerxonline.com/2015/04/08/houston-animated-track-map </guid> <pubDate>Wed, 08 Apr 2015 13:00:00 -0400</pubDate> <description> <![CDATA[ Take a lap with the green arrow. ]]> </description> <media:content url="//rx.iscdn.net/2015/04/96341_rd14_houston01thumb.jpg" type="image/jpeg" medium="image"/> </item> </channel> </rss>'; $xml = simplexml_load_string( $xml); foreach( $rss->channel->item as $child) { echo $child . "\n"; }
based on DBHla
Output for 7.2.0
Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): racerxonline.com/2015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): 015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source=Feed&utm_campaign in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Notice: Undefined variable: rss in /in/9iUIi on line 37 Notice: Trying to get property 'channel' of non-object in /in/9iUIi on line 37 Notice: Trying to get property 'item' of non-object in /in/9iUIi on line 37 Warning: Invalid argument supplied for foreach() in /in/9iUIi on line 37
Output for 5.2.1 - 7.1.10
Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): racerxonline.com/2015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): 015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source=Feed&utm_campaign in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Notice: Undefined variable: rss in /in/9iUIi on line 37 Notice: Trying to get property of non-object in /in/9iUIi on line 37 Notice: Trying to get property of non-object in /in/9iUIi on line 37 Warning: Invalid argument supplied for foreach() in /in/9iUIi on line 37
Output for 5.1.0 - 5.2.0
Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): racerxonline.com/2015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Warning: simplexml_load_string(): Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: simplexml_load_string(): 015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source=Feed&utm_campaign in /in/9iUIi on line 36 Warning: simplexml_load_string(): ^ in /in/9iUIi on line 36 Warning: Invalid argument supplied for foreach() in /in/9iUIi on line 37
Output for 5.0.0 - 5.0.5
Warning: Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: racerxonline.com/2015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source in /in/9iUIi on line 36 Warning: ^ in /in/9iUIi on line 36 Warning: Entity: line 21: parser error : EntityRef: expecting ';' in /in/9iUIi on line 36 Warning: 015/04/08/houston-animated-track-map?utm_medium=RSS&utm_source=Feed&utm_campaign in /in/9iUIi on line 36 Warning: ^ in /in/9iUIi on line 36 Warning: Invalid argument supplied for foreach() in /in/9iUIi on line 37
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/9iUIi on line 36
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/9iUIi on line 36
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/9iUIi on line 36