3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlresponse = '<?xml version="1.0" encoding="utf-8"?> <string xmlns="http://www.cebroker.com/CEBrokerWebService/">&lt;licensees&gt;&lt;licensee valid="true" State="FL" licensee_profession="RN" licensee_number="2676612" state_license_format="" first_name="HENRY" last_name="GEITER" ErrorCode="" Message="" TimeStamp="2/19/2022 4:53:35 AM" /&gt;&lt;/licensees&gt;</string>'; $xml_string = simplexml_load_string($xmlresponse); echo 'First time, we only get it as a string, not as XML' . PHP_EOL; echo '------------------------------------------'. PHP_EOL; var_dump($xml_string); // We can see that it's just a stirng, not XML echo PHP_EOL . PHP_EOL; $licensees = simplexml_load_string($xml_string); echo 'The second time, we do get it as XML' . PHP_EOL; echo '------------------------------------------'. PHP_EOL; var_dump($licensees); // Not it's actually read as XML

preferences:
42.29 ms | 402 KiB | 5 Q