3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = <<<xml <?xml version="1.0" encoding="utf-8"?> <RESPONSE> <SUCCESS>true</SUCCESS> <ERRORMESSAGE> </ERRORMESSAGE> <TIMESTAMP>21/09/2015 03:26:37</TIMESTAMP> </RESPONSE> xml; $response = simplexml_load_string($xml); //$response = json_decode(json_encode($response), TRUE); print_r($response);
based on t2gYP
Output for 5.3.18 - 5.3.29, 5.5.27 - 5.5.35, 5.6.11 - 7.2.0
SimpleXMLElement Object ( [SUCCESS] => true [ERRORMESSAGE] => SimpleXMLElement Object ( [0] => ) [TIMESTAMP] => 21/09/2015 03:26:37 )
Output for 5.4.8 - 5.5.26, 5.6.8 - 5.6.10
SimpleXMLElement Object ( [SUCCESS] => true [ERRORMESSAGE] => SimpleXMLElement Object ( ) [TIMESTAMP] => 21/09/2015 03:26:37 )