3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $html = '<b>Hello</b><i>World</i>'; $doc = new DOMDocument(); $element = $doc->createDocumentFragment(); $element->appendXML($html); foreach ($element->childNodes->getIterator() as $child) { $element = null; //$doc = null; //var_dump($child->nodeValue); } } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZJYYd
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/ZJYYd
function name:  foo
number of ops:  19
compiled vars:  !0 = $html, !1 = $doc, !2 = $element, !3 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cb%3EHello%3C%2Fb%3E%3Ci%3EWorld%3C%2Fi%3E'
    4     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
    5     4        INIT_METHOD_CALL                                         !1, 'createDocumentFragment'
          5        DO_FCALL                                      0  $8      
          6        ASSIGN                                                   !2, $8
    6     7        INIT_METHOD_CALL                                         !2, 'appendXML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    7    10        FETCH_OBJ_R                                      ~11     !2, 'childNodes'
         11        INIT_METHOD_CALL                                         ~11, 'getIterator'
         12        DO_FCALL                                      0  $12     
         13      > FE_RESET_R                                       $13     $12, ->17
         14    > > FE_FETCH_R                                               $13, !3, ->17
    8    15    >   ASSIGN                                                   !2, null
    7    16      > JMP                                                      ->14
         17    >   FE_FREE                                                  $13
   12    18      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.46 ms | 1398 KiB | 14 Q