3v4l.org

run code in 300+ PHP versions simultaneously
<?php libxml_use_internal_errors(true); $html = '<p>foo<p></p></p>'; $dom = new DOMDocument; $dom->loadHTML($html); $nodes = $dom->getElementsByTagName('p'); foreach($nodes as $node) echo $dom->saveHTML($node);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/h9Ja4
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $dom, !2 = $nodes, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'libxml_use_internal_errors'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                                 
    3     3        ASSIGN                                                   !0, '%3Cp%3Efoo%3Cp%3E%3C%2Fp%3E%3C%2Fp%3E'
    4     4        NEW                                              $6      'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
    5     7        INIT_METHOD_CALL                                         !1, 'loadHTML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    6    10        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         11        SEND_VAL_EX                                              'p'
         12        DO_FCALL                                      0  $10     
         13        ASSIGN                                                   !2, $10
    8    14      > FE_RESET_R                                       $12     !2, ->21
         15    > > FE_FETCH_R                                               $12, !3, ->21
    9    16    >   INIT_METHOD_CALL                                         !1, 'saveHTML'
         17        SEND_VAR_EX                                              !3
         18        DO_FCALL                                      0  $13     
         19        ECHO                                                     $13
    8    20      > JMP                                                      ->15
         21    >   FE_FREE                                                  $12
    9    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.69 ms | 1395 KiB | 15 Q