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
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/da3Up
function name:  (null)
number of ops:  21
compiled vars:  !0 = $xmlresponse, !1 = $xml_string, !2 = $licensees
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E+%0A%3Cstring+xmlns%3D%22http%3A%2F%2Fwww.cebroker.com%2FCEBrokerWebService%2F%22%3E%26lt%3Blicensees%26gt%3B%26lt%3Blicensee%0A+valid%3D%22true%22+State%3D%22FL%22+licensee_profession%3D%22RN%22%0A+licensee_number%3D%222676612%22+state_license_format%3D%22%22+first_name%3D%22HENRY%22%0A+last_name%3D%22GEITER%22+ErrorCode%3D%22%22+Message%3D%22%22+TimeStamp%3D%222%2F19%2F2022%0A+4%3A53%3A35+AM%22+%2F%26gt%3B%26lt%3B%2Flicensees%26gt%3B%3C%2Fstring%3E'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   11     5        ECHO                                                     'First+time%2C+we+only+get+it+as+a+string%2C+not+as+XML%0A'
   12     6        ECHO                                                     '------------------------------------------%0A'
   13     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   15    10        ECHO                                                     '%0A%0A'
   16    11        INIT_FCALL                                               'simplexml_load_string'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !2, $7
   17    15        ECHO                                                     'The+second+time%2C+we+do+get+it+as+XML%0A'
   18    16        ECHO                                                     '------------------------------------------%0A'
   19    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.97 ms | 1395 KiB | 17 Q