3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='Child3' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = new DOMDocument(); $xml->load('$xml'); $htp = $xml->getElementsByTagName('root'); print_r($htp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gt78d
function name:  (null)
number of ops:  15
compiled vars:  !0 = $xml, !1 = $htp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Croot%3E%0A++++%3Cparent%3E%0A++++++++%3Cchild+name%3D%27Child1%27+%2F%3E%0A++++++++%3Cchild+name%3D%27Child2%27+%2F%3E%0A++++++++%3Csubparent%3E%0A++++++++++++%3Cchild+name%3D%27Child3%27+%2F%3E%0A++++++++%3C%2Fsubparent%3E%0A++++%3C%2Fparent%3E%0A++++%3Cchild+name%3D%27Child4%27+%2F%3E%0A%3C%2Froot%3E'
   13     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   14     4        INIT_METHOD_CALL                                         !0, 'load'
          5        SEND_VAL_EX                                              '%24xml'
          6        DO_FCALL                                      0          
   15     7        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'root'
          9        DO_FCALL                                      0  $7      
         10        ASSIGN                                                   !1, $7
   16    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156 ms | 1386 KiB | 15 Q