3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadXML('<root><stuff/><stuff/></root>'); $nodes = iterator_to_array($dom->getElementsByTagName('stuff')); array_walk($nodes, 'var_dump'); // expected int(2) from $nodes->length
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YWDpL
function name:  (null)
number of ops:  18
compiled vars:  !0 = $dom, !1 = $nodes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Croot%3E%3Cstuff%2F%3E%3Cstuff%2F%3E%3C%2Froot%3E'
          5        DO_FCALL                                      0          
    5     6        INIT_FCALL                                               'iterator_to_array'
          7        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'stuff'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    6    13        INIT_FCALL                                               'array_walk'
         14        SEND_REF                                                 !1
         15        SEND_VAL                                                 'var_dump'
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.15 ms | 1394 KiB | 17 Q