3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dd1 = new DOMDocument(); $q = "//saved-copy-url/text()"; $xpath = new DOMXPath($dd1); $nodes = $xpath->query($q); $list = array(); foreach($nodes as $node) { $list[] = trim($node->textContent); } var_dump($list);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/ThGCY
function name:  (null)
number of ops:  27
compiled vars:  !0 = $dd1, !1 = $q, !2 = $xpath, !3 = $nodes, !4 = $list, !5 = $node
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        ASSIGN                                                   !1, '%2F%2Fsaved-copy-url%2Ftext%28%29'
    6     4        NEW                                              $10     'DOMXPath'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $10
    7     8        INIT_METHOD_CALL                                         !2, 'query'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $13     
         11        ASSIGN                                                   !3, $13
    9    12        ASSIGN                                                   !4, <array>
   10    13      > FE_RESET_R                                       $16     !3, ->22
         14    > > FE_FETCH_R                                               $16, !5, ->22
   11    15    >   INIT_FCALL                                               'trim'
         16        FETCH_OBJ_R                                      ~18     !5, 'textContent'
         17        SEND_VAL                                                 ~18
         18        DO_ICALL                                         $19     
         19        ASSIGN_DIM                                               !4
         20        OP_DATA                                                  $19
   10    21      > JMP                                                      ->14
         22    >   FE_FREE                                                  $16
   14    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1395 KiB | 17 Q