3v4l.org

run code in 500+ PHP versions simultaneously
<?php $example = <<<XML <example> <selfClosed/> <empty></empty> </example> XML; $xmlReader = new XMLReader(); $xmlReader->xml($example); while ($xmlReader->read()) { if ($xmlReader->nodeType === XMLReader::ELEMENT) { echo '<', $xmlReader->name, '> is ', $xmlReader->isEmptyElement ? 'empty' : 'not empty', PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
Branch analysis from position: 8
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 8
Branch analysis from position: 25
Branch analysis from position: 8
Branch analysis from position: 22
filename:       /in/3p6vV
function name:  (null)
number of ops:  26
compiled vars:  !0 = $example, !1 = $xmlReader
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cexample%3E%0A++++%3CselfClosed%2F%3E%0A++++%3Cempty%3E%3C%2Fempty%3E%0A%3C%2Fexample%3E'
   10     1        NEW                                                  $3      'XMLReader'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $3
   11     4        INIT_METHOD_CALL                                             !1, 'xml'
          5        SEND_VAR_EX                                                  !0
          6        DO_FCALL                                          0          
   12     7      > JMP                                                          ->22
   13     8    >   FETCH_OBJ_R                                          ~7      !1, 'nodeType'
          9        IS_IDENTICAL                                                 ~7, 1
         10      > JMPZ                                                         ~8, ->22
   14    11    >   ECHO                                                         '%3C'
         12        FETCH_OBJ_R                                          ~9      !1, 'name'
         13        ECHO                                                         ~9
         14        ECHO                                                         '%3E+is+'
         15        FETCH_OBJ_R                                          ~10     !1, 'isEmptyElement'
         16      > JMPZ                                                         ~10, ->19
         17    >   QM_ASSIGN                                            ~11     'empty'
         18      > JMP                                                          ->20
         19    >   QM_ASSIGN                                            ~11     'not+empty'
         20    >   ECHO                                                         ~11
         21        ECHO                                                         '%0A'
   12    22    >   INIT_METHOD_CALL                                             !1, 'read'
         23        DO_FCALL                                          0  $12     
         24      > JMPNZ                                                        $12, ->8
   16    25    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
191.18 ms | 1460 KiB | 13 Q