3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x='<aaa><bbb ccc="ddd"/></aaa>'; $d=new \DOMDocument('1.0','utf-8'); $d->loadXML($x); $x=new \DOMXpath($d); $i=$x->query('//bbb'); echo $i->length();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bpG8Q
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x, !1 = $d, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Caaa%3E%3Cbbb+ccc%3D%22ddd%22%2F%3E%3C%2Faaa%3E'
    5     1        NEW                                              $4      'DOMDocument'
          2        SEND_VAL_EX                                              '1.0'
          3        SEND_VAL_EX                                              'utf-8'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
    6     6        INIT_METHOD_CALL                                         !1, 'loadXML'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
    7     9        NEW                                              $8      'DOMXpath'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !0, $8
    8    13        INIT_METHOD_CALL                                         !0, 'query'
         14        SEND_VAL_EX                                              '%2F%2Fbbb'
         15        DO_FCALL                                      0  $11     
         16        ASSIGN                                                   !2, $11
   10    17        INIT_METHOD_CALL                                         !2, 'length'
         18        DO_FCALL                                      0  $13     
         19        ECHO                                                     $13
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162 ms | 1394 KiB | 13 Q