3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<HTML><BODY><P>HELLO</P></BODY></HTML>'; $dom = new DOMDocument(); $dom->loadHTML( $html ); foreach ( $dom->getElementsByTagName( '*' ) as $el ) { echo "nodeName: " . $el->nodeName . PHP_EOL; echo "tagName: " . $el->tagName . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/oDCO6
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $dom, !2 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3CHTML%3E%3CBODY%3E%3CP%3EHELLO%3C%2FP%3E%3C%2FBODY%3E%3C%2FHTML%3E'
    4     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    7     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              '%2A'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->21
         11    > > FE_FETCH_R                                               $9, !2, ->21
    8    12    >   FETCH_OBJ_R                                      ~10     !2, 'nodeName'
         13        CONCAT                                           ~11     'nodeName%3A+', ~10
         14        CONCAT                                           ~12     ~11, '%0A'
         15        ECHO                                                     ~12
    9    16        FETCH_OBJ_R                                      ~13     !2, 'tagName'
         17        CONCAT                                           ~14     'tagName%3A+', ~13
         18        CONCAT                                           ~15     ~14, '%0A'
         19        ECHO                                                     ~15
    7    20      > JMP                                                      ->11
         21    >   FE_FREE                                                  $9
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
265.9 ms | 1067 KiB | 13 Q