3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = <<<'XML' <?xml version="1.0" encoding="utf-8"?> <install type="component" version="1.5.0"> <name>Simplelists - Myspace & Beatport</name> <author>Jisse Reitsma - modified by David Richardson</author> <creationDate>January 2008</creationDate> <copyright>Copyright 2007 Jira ICT</copyright> <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> <authorEmail>info@jira.nl</authorEmail> <authorUrl>www.jira.nl</authorUrl> <version>1.5.0.6</version> <description>This component shows a simple listing of items which can be displayed through multiple views/themes.</description> <!-- installation part --> <install> <queries> <query> CREATE TABLE IF NOT EXISTS `#__simplelists` ( `id` int(11) NOT NULL auto_increment, `catid` int(11) NOT NULL default 0, `title` varchar(255) NOT NULL default '', `url1` varchar(255) NOT NULL default '', `url2` varchar(255) NOT NULL default '', `text` text NOT NULL default '', `picture1` text NOT NULL default '', `picture2` text NOT NULL default '', `published` tinyint(1) NOT NULL default 0, `checked_out` tinyint(1) NOT NULL default 0, `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00', `ordering` int(11) NOT NULL default 0, `params` text NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM ; </query> </queries> </install> <installfile>install.simplelists.php</installfile> <uninstallfile>uninstall.simplelists.php</uninstallfile> <!-- user part --> <files folder="components/com_simplelists"> <filename>js/scriptaculous-js-1.8.0/src/dragdrop.js</filename> <filename>js/scriptaculous-js-1.8.0/src/effects.js</filename> <filename>js/scriptaculous-js-1.8.0/src/unittest.js</filename> <filename>js/scriptaculous-js-1.8.0/src/builder.js</filename> <filename>js/scriptaculous-js-1.8.0/src/controls.js</filename> <filename>js/scriptaculous-js-1.8.0/src/sound.js</filename> <filename>js/scriptaculous-js-1.8.0/src/scriptaculous.js</filename> <filename>js/scriptaculous-js-1.8.0/src/slider.js</filename> <filename>js/scriptaculous-js-1.8.0/README</filename> <filename>js/scriptaculous-js-1.8.0/lib/prototype.js</filename> <filename>js/scriptaculous-js-1.8.0/MIT-LICENSE</filename> <filename>js/scriptaculous-js-1.8.0/CHANGELOG</filename> <filename>router.php</filename> <filename>css/hover.css</filename> <filename>css/picture.css</filename> <filename>css/table.css</filename> <filename>css/toggle.css</filename> <filename>css/default.css</filename> <filename>models/simplelist.php</filename> <filename>models/index.html</filename> <filename>index.html</filename> <filename>metadata.xml</filename> <filename>simplelists.php</filename> <filename>views/simplelist/tmpl/toggle.xml</filename> <filename>views/simplelist/tmpl/picture.php</filename> <filename>views/simplelist/tmpl/basic.xml</filename> <filename>views/simplelist/tmpl/table.xml</filename> <filename>views/simplelist/tmpl/picture.xml</filename> <filename>views/simplelist/tmpl/index.html</filename> <filename>views/simplelist/tmpl/hover.xml</filename> <filename>views/simplelist/tmpl/basic.php</filename> <filename>views/simplelist/tmpl/table.php</filename> <filename>views/simplelist/tmpl/default.xml</filename> <filename>views/simplelist/tmpl/toggle.php</filename> <filename>views/simplelist/tmpl/default.php</filename> <filename>views/simplelist/tmpl/hover.php</filename> <filename>views/simplelist/index.html</filename> <filename>views/simplelist/metadata.xml</filename> <filename>views/simplelist/view.html.php</filename> <filename>views/index.html</filename> <filename>controller.php</filename> </files> <languages folder="language/en-GB"> <language tag="en-GB">en-GB.com_simplelists.ini</language> </languages> <!-- administration part --> <administration> <menu task="default" img="components/com_simplelists/images/simplelists.png">Simple Lists</menu> <submenu> <menu link="option=com_simplelists">Items</menu> <menu link="option=com_categories&amp;section=com_simplelists">Categories</menu> </submenu> <files> <filename>simplelists.xml</filename> </files> <files folder="administrator/components/com_simplelists"> <filename>images/simplelists.png</filename> <filename>models/simplelist.php</filename> <filename>models/index.html</filename> <filename>models/simplelists.php</filename> <filename>models/simplelist.xml</filename> <filename>index.html</filename> <filename>uninstall.simplelists.php</filename> <filename>config.xml</filename> <filename>install.simplelists.php</filename> <filename>simplelists.php</filename> <filename>views/versioncheck/view.html.php</filename> <filename>views/simplelist/tmpl/index.html</filename> <filename>views/simplelist/tmpl/form.php</filename> <filename>views/simplelist/index.html</filename> <filename>views/simplelist/view.html.php</filename> <filename>views/index.html</filename> <filename>views/simplelists/tmpl/index.html</filename> <filename>views/simplelists/tmpl/default.php</filename> <filename>views/simplelists/index.html</filename> <filename>views/simplelists/view.html.php</filename> <filename>tables/simplelist.php</filename> <filename>tables/index.html</filename> <filename>controller.php</filename> </files> <languages folder="administrator/language/en-GB"> <language tag="en-GB">en-GB.com_simplelists.menu.ini</language> <language tag="en-GB">en-GB.com_simplelists.ini</language> </languages> </administration> </install> Top XML; libxml_use_internal_errors(); try { $xmlObj = new SimpleXMLElement($xml); } catch(Exception $e) { var_dump(libxml_get_last_error()); }
based on K2Flb
Output for 5.6.30, 7.0.30 - 7.2.8
Warning: SimpleXMLElement::__construct(): Entity: line 3: parser error : xmlParseEntityRef: no name in /in/kc5dh on line 143 Warning: SimpleXMLElement::__construct(): <name>Simplelists - Myspace & Beatport</name> in /in/kc5dh on line 143 Warning: SimpleXMLElement::__construct(): ^ in /in/kc5dh on line 143 Warning: SimpleXMLElement::__construct(): Entity: line 135: parser error : Extra content at the end of the document in /in/kc5dh on line 143 Warning: SimpleXMLElement::__construct(): Top in /in/kc5dh on line 143 Warning: SimpleXMLElement::__construct(): ^ in /in/kc5dh on line 143 object(LibXMLError)#1 (6) { ["level"]=> int(3) ["code"]=> int(5) ["column"]=> int(1) ["message"]=> string(41) "Extra content at the end of the document " ["file"]=> string(0) "" ["line"]=> int(135) }
Output for hhvm-3.18.5 - 3.22.0
object(LibXMLError)#3 (6) { ["level"]=> int(3) ["code"]=> int(5) ["column"]=> int(1) ["message"]=> string(41) "Extra content at the end of the document " ["file"]=> NULL ["line"]=> int(135) } Entity: line 3: parser error : xmlParseEntityRef: no name <name>Simplelists - Myspace & Beatport</name> ^ Entity: line 135: parser error : Extra content at the end of the document Top ^