3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = '<Address><to>James</to><from>Jani</from><heading>Reminder</heading><body>Please check your mail.</body></Address>'; $element = simplexml_load_string($xmlstr); echo $element->getName(); var_dump($element->attributes);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nN2Z
function name:  (null)
number of ops:  13
compiled vars:  !0 = $xmlstr, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3CAddress%3E%3Cto%3EJames%3C%2Fto%3E%3Cfrom%3EJani%3C%2Ffrom%3E%3Cheading%3EReminder%3C%2Fheading%3E%3Cbody%3EPlease+check+your+mail.%3C%2Fbody%3E%3C%2FAddress%3E'
    5     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    6     5        INIT_METHOD_CALL                                         !1, 'getName'
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
    8     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~6      !1, 'attributes'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151 ms | 1394 KiB | 17 Q