3v4l.org

run code in 300+ PHP versions simultaneously
<?php $root = new DOMDocument(); $root->loadXML('<article id=""></article>'); for($i=0;$i<=300;$i++){ $node = new DOMDocument(); $node->loadXML('<section id="'.$i.'"><h1>Überschrift</h1><h2>Überschrift2</h2><p>Content</p></section>'); $xpath = new DOMXPath($node); $query = '//h1'; $entries=$xpath->query($query); print_r($entries->nodeValue); $node = $root->importNode($node->documentElement, true); $root->documentElement->appendChild($node); } #print $root->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 8
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 8
Branch analysis from position: 43
Branch analysis from position: 8
filename:       /in/OEDVn
function name:  (null)
number of ops:  44
compiled vars:  !0 = $root, !1 = $i, !2 = $node, !3 = $xpath, !4 = $query, !5 = $entries
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    4     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Carticle+id%3D%22%22%3E%3C%2Farticle%3E'
          5        DO_FCALL                                      0          
    5     6        ASSIGN                                                   !1, 0
          7      > JMP                                                      ->41
    6     8    >   NEW                                              $11     'DOMDocument'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
    7    11        INIT_METHOD_CALL                                         !2, 'loadXML'
         12        CONCAT                                           ~14     '%3Csection+id%3D%22', !1
         13        CONCAT                                           ~15     ~14, '%22%3E%3Ch1%3E%C3%9Cberschrift%3C%2Fh1%3E%3Ch2%3E%C3%9Cberschrift2%3C%2Fh2%3E%3Cp%3EContent%3C%2Fp%3E%3C%2Fsection%3E'
         14        SEND_VAL_EX                                              ~15
         15        DO_FCALL                                      0          
    8    16        NEW                                              $17     'DOMXPath'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !3, $17
    9    20        ASSIGN                                                   !4, '%2F%2Fh1'
   10    21        INIT_METHOD_CALL                                         !3, 'query'
         22        SEND_VAR_EX                                              !4
         23        DO_FCALL                                      0  $21     
         24        ASSIGN                                                   !5, $21
   11    25        INIT_FCALL                                               'print_r'
         26        FETCH_OBJ_R                                      ~23     !5, 'nodeValue'
         27        SEND_VAL                                                 ~23
         28        DO_ICALL                                                 
   12    29        INIT_METHOD_CALL                                         !0, 'importNode'
         30        CHECK_FUNC_ARG                                           
         31        FETCH_OBJ_FUNC_ARG                               $25     !2, 'documentElement'
         32        SEND_FUNC_ARG                                            $25
         33        SEND_VAL_EX                                              <true>
         34        DO_FCALL                                      0  $26     
         35        ASSIGN                                                   !2, $26
   13    36        FETCH_OBJ_R                                      ~28     !0, 'documentElement'
         37        INIT_METHOD_CALL                                         ~28, 'appendChild'
         38        SEND_VAR_EX                                              !2
         39        DO_FCALL                                      0          
    5    40        PRE_INC                                                  !1
         41    >   IS_SMALLER_OR_EQUAL                                      !1, 300
         42      > JMPNZ                                                    ~31, ->8
   15    43    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
306.81 ms | 1400 KiB | 16 Q