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'; print_r($xpath->query($query)); $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 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 8
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 8
Branch analysis from position: 41
Branch analysis from position: 8
filename:       /in/HpQtS
function name:  (null)
number of ops:  42
compiled vars:  !0 = $root, !1 = $i, !2 = $node, !3 = $xpath, !4 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    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                                                      ->39
    6     8    >   NEW                                              $10     'DOMDocument'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
    7    11        INIT_METHOD_CALL                                         !2, 'loadXML'
         12        CONCAT                                           ~13     '%3Csection+id%3D%22', !1
         13        CONCAT                                           ~14     ~13, '%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                                              ~14
         15        DO_FCALL                                      0          
    8    16        NEW                                              $16     'DOMXPath'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !3, $16
    9    20        ASSIGN                                                   !4, '%2F%2Fh1'
   10    21        INIT_FCALL                                               'print_r'
         22        INIT_METHOD_CALL                                         !3, 'query'
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0  $20     
         25        SEND_VAR                                                 $20
         26        DO_ICALL                                                 
   12    27        INIT_METHOD_CALL                                         !0, 'importNode'
         28        CHECK_FUNC_ARG                                           
         29        FETCH_OBJ_FUNC_ARG                               $22     !2, 'documentElement'
         30        SEND_FUNC_ARG                                            $22
         31        SEND_VAL_EX                                              <true>
         32        DO_FCALL                                      0  $23     
         33        ASSIGN                                                   !2, $23
   13    34        FETCH_OBJ_R                                      ~25     !0, 'documentElement'
         35        INIT_METHOD_CALL                                         ~25, 'appendChild'
         36        SEND_VAR_EX                                              !2
         37        DO_FCALL                                      0          
    5    38        PRE_INC                                                  !1
         39    >   IS_SMALLER_OR_EQUAL                                      !1, 300
         40      > JMPNZ                                                    ~28, ->8
   15    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.43 ms | 1400 KiB | 15 Q