3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $res = ' <rsp stat="fail" version="1.0"> <err code="1" msg="Invalid API key or user key"/> </rsp> '; $ret = simplexml_load_string($res); print_r($ret->err[0]);
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 ( [code] => 1 [msg] => Invalid API key or user key ) )
Output for 5.0.0 - 5.1.1
SimpleXMLElement Object ( )
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_string() in <b>/in/DHCt7</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_string() in <b>/in/DHCt7</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_string() in <b>/in/DHCt7</b> on line <b>8</b><br />