3v4l.org

run code in 300+ PHP versions simultaneously
<?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->header->numhits);
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
SimpleXMLElement Object ( [0] => 0 )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_string() in /in/69G66 on line 43
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_string() in /in/69G66 on line 43
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: simplexml_load_string() in /in/69G66 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/69G66 on line 43

preferences:
304.89 ms | 401 KiB | 460 Q