3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DomDocument; $dom->loadXml('<rows><row><left>Left Side</left><right>Right Side</right></row></rows>'); $nodes = $dom->getElementsByTagName('row'); foreach($nodes as $node) { $childNodes = $node->getElementsByTagName('left'); var_dump($childNodes); exit; var_dump($node->childNodes->item(0)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 28
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/QuY7c
function name:  (null)
number of ops:  30
compiled vars:  !0 = $dom, !1 = $nodes, !2 = $node, !3 = $childNodes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DomDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        INIT_METHOD_CALL                                         !0, 'loadXml'
          4        SEND_VAL_EX                                              '%3Crows%3E%3Crow%3E%3Cleft%3ELeft+Side%3C%2Fleft%3E%3Cright%3ERight+Side%3C%2Fright%3E%3C%2Frow%3E%3C%2Frows%3E'
          5        DO_FCALL                                      0          
    5     6        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          7        SEND_VAL_EX                                              'row'
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !1, $8
    6    10      > FE_RESET_R                                       $10     !1, ->28
         11    > > FE_FETCH_R                                               $10, !2, ->28
    7    12    >   INIT_METHOD_CALL                                         !2, 'getElementsByTagName'
         13        SEND_VAL_EX                                              'left'
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !3, $11
    8    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > EXIT                                                     
    9    20*       INIT_FCALL                                               'var_dump'
         21*       FETCH_OBJ_R                                      ~14     !2, 'childNodes'
         22*       INIT_METHOD_CALL                                         ~14, 'item'
         23*       SEND_VAL_EX                                              0
         24*       DO_FCALL                                      0  $15     
         25*       SEND_VAR                                                 $15
         26*       DO_ICALL                                                 
    6    27*       JMP                                                      ->11
         28    >   FE_FREE                                                  $10
   10    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.81 ms | 1388 KiB | 15 Q