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->item0->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 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 8
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 8
Branch analysis from position: 44
Branch analysis from position: 8
filename:       /in/22FKY
function name:  (null)
number of ops:  45
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                                                      ->42
    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, 'item0'
         27        FETCH_OBJ_R                                      ~24     ~23, 'nodeValue'
         28        SEND_VAL                                                 ~24
         29        DO_ICALL                                                 
   12    30        INIT_METHOD_CALL                                         !0, 'importNode'
         31        CHECK_FUNC_ARG                                           
         32        FETCH_OBJ_FUNC_ARG                               $26     !2, 'documentElement'
         33        SEND_FUNC_ARG                                            $26
         34        SEND_VAL_EX                                              <true>
         35        DO_FCALL                                      0  $27     
         36        ASSIGN                                                   !2, $27
   13    37        FETCH_OBJ_R                                      ~29     !0, 'documentElement'
         38        INIT_METHOD_CALL                                         ~29, 'appendChild'
         39        SEND_VAR_EX                                              !2
         40        DO_FCALL                                      0          
    5    41        PRE_INC                                                  !1
         42    >   IS_SMALLER_OR_EQUAL                                      !1, 300
         43      > JMPNZ                                                    ~32, ->8
   15    44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.45 ms | 1400 KiB | 15 Q