3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = <<<EOF <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE romeoapi SYSTEM "http://www.sherpa.ac.uk/romeo/romeoapi24.dtd"> <romeoapi version="2.9.4"> <header> <parameters> <parameter source="specified"> <parametername>id</parametername> <parametervalue>213213213213213</parametervalue> </parameter> <parameter source="default"> <parametername>showfunder</parametername> <parametervalue>none</parametervalue> </parameter> <parameter source="default"> <parametername>fIDnum</parametername> <parametervalue>|</parametervalue> </parameter> <parameter source="default"> <parametername>la</parametername> <parametervalue>en</parametervalue> </parameter> <parameter source="default"> <parametername>versions</parametername> <parametervalue>legacy</parametervalue> </parameter> </parameters> <numhits>0</numhits> <apicontrol>identifier</apicontrol> <outcome>notFound</outcome> <message /> <licence>SHERPA/RoMEO data is available for re-use under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 licence. For more details, please see the 'conditions for re-use' at the &lt;licenceurl /&gt;, and linked-to from the SHERPA/RoMEO home page.</licence> <licenceurl>http://www.sherpa.ac.uk/romeoreuse.html</licenceurl> <disclaimer>All SHERPA/RoMEO information is correct to the best of our knowledge but should not be relied upon for legal advice. SHERPA cannot be held responsible for the re-use of RoMEO data, or for alternative interpretations which are derived from this information.</disclaimer> <timestamp>16-Oct-2013:15:00:12</timestamp> </header> <journals /> <publishers /> </romeoapi> EOF; $check = simplexml_load_string($string); print_r($check);
Output for 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
SimpleXMLElement Object ( [@attributes] => Array ( [version] => 2.9.4 ) [header] => SimpleXMLElement Object ( [parameters] => SimpleXMLElement Object ( [parameter] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [source] => specified ) [parametername] => id [parametervalue] => 213213213213213 ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [source] => default ) [parametername] => showfunder [parametervalue] => none ) [2] => SimpleXMLElement Object ( [@attributes] => Array ( [source] => default ) [parametername] => fIDnum [parametervalue] => | ) [3] => SimpleXMLElement Object ( [@attributes] => Array ( [source] => default ) [parametername] => la [parametervalue] => en ) [4] => SimpleXMLElement Object ( [@attributes] => Array ( [source] => default ) [parametername] => versions [parametervalue] => legacy ) ) ) [numhits] => 0 [apicontrol] => identifier [outcome] => notFound [message] => SimpleXMLElement Object ( ) [licence] => SHERPA/RoMEO data is available for re-use under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 licence. For more details, please see the 'conditions for re-use' at the <licenceurl />, and linked-to from the SHERPA/RoMEO home page. [licenceurl] => http://www.sherpa.ac.uk/romeoreuse.html [disclaimer] => All SHERPA/RoMEO information is correct to the best of our knowledge but should not be relied upon for legal advice. SHERPA cannot be held responsible for the re-use of RoMEO data, or for alternative interpretations which are derived from this information. [timestamp] => 16-Oct-2013:15:00:12 ) [journals] => SimpleXMLElement Object ( ) [publishers] => SimpleXMLElement Object ( ) )
Output for 5.0.0 - 5.1.1
SimpleXMLElement Object ( [header] => SimpleXMLElement Object ( [parameters] => SimpleXMLElement Object ( [parameter] => Array ( [0] => SimpleXMLElement Object ( [parametername] => id [parametervalue] => 213213213213213 ) [1] => SimpleXMLElement Object ( [parametername] => showfunder [parametervalue] => none ) [2] => SimpleXMLElement Object ( [parametername] => fIDnum [parametervalue] => | ) [3] => SimpleXMLElement Object ( [parametername] => la [parametervalue] => en ) [4] => SimpleXMLElement Object ( [parametername] => versions [parametervalue] => legacy ) ) ) [numhits] => 0 [apicontrol] => identifier [outcome] => notFound [message] => SimpleXMLElement Object ( ) [licence] => SHERPA/RoMEO data is available for re-use under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 licence. For more details, please see the 'conditions for re-use' at the <licenceurl />, and linked-to from the SHERPA/RoMEO home page. [licenceurl] => http://www.sherpa.ac.uk/romeoreuse.html [disclaimer] => All SHERPA/RoMEO information is correct to the best of our knowledge but should not be relied upon for legal advice. SHERPA cannot be held responsible for the re-use of RoMEO data, or for alternative interpretations which are derived from this information. [timestamp] => 16-Oct-2013:15:00:12 ) [journals] => SimpleXMLElement Object ( ) [publishers] => SimpleXMLElement Object ( ) )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/pPQPA on line 43
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/pPQPA on line 43
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: simplexml_load_string() in /in/pPQPA on line 44
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_string() in /in/pPQPA on line 43