3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sxe = new SimpleXMLElement('<people xmlns:p="http://example.org/ns" xmlns:t="http://example.org/test"/>'); $xpath = new DOMXPath(($doc = dom_import_simplexml($sxe)->ownerDocument)); foreach($xpath->evaluate('/*/namespace::*') as $result) print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/iecUQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $sxe, !1 = $xpath, !2 = $doc, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Cpeople+xmlns%3Ap%3D%22http%3A%2F%2Fexample.org%2Fns%22+xmlns%3At%3D%22http%3A%2F%2Fexample.org%2Ftest%22%2F%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    3     4        NEW                                              $7      'DOMXPath'
          5        INIT_FCALL                                               'dom_import_simplexml'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8        FETCH_OBJ_R                                      ~9      $8, 'ownerDocument'
          9        ASSIGN                                           ~10     !2, ~9
         10        SEND_VAL_EX                                              ~10
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $7
    4    13        INIT_METHOD_CALL                                         !1, 'evaluate'
         14        SEND_VAL_EX                                              '%2F%2A%2Fnamespace%3A%3A%2A'
         15        DO_FCALL                                      0  $13     
         16      > FE_RESET_R                                       $14     $13, ->22
         17    > > FE_FETCH_R                                               $14, !3, ->22
         18    >   INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > JMP                                                      ->17
         22    >   FE_FREE                                                  $14
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.69 ms | 1395 KiB | 17 Q