3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOD <?xml version="1.0" ?> <chapter xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Books of the other guy..</title> <para> <xi:include href="book.xml"> <xi:fallback> <error>xinclude: book.xml not found</error> </xi:fallback> </xi:include> <include> This is another namespace </include> </para> </chapter> EOD; $dom = new DOMDocument; // load the XML string defined above $dom->loadXML($xml); foreach ($dom->getElementsByTagNameNS('http://www.w3.org/2001/XInclude', '*') as $element) { echo 'local name: ', $element->localName, ', prefix: ', $element->prefix, "\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/6hH4g
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xml, !1 = $dom, !2 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+%3F%3E%0A%3Cchapter+xmlns%3Axi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXInclude%22%3E%0A%3Ctitle%3EBooks+of+the+other+guy..%3C%2Ftitle%3E%0A%3Cpara%3E%0A+%3Cxi%3Ainclude+href%3D%22book.xml%22%3E%0A++%3Cxi%3Afallback%3E%0A+++%3Cerror%3Exinclude%3A+book.xml+not+found%3C%2Ferror%3E%0A++%3C%2Fxi%3Afallback%3E%0A+%3C%2Fxi%3Ainclude%3E%0A+%3Cinclude%3E%0A++This+is+another+namespace%0A+%3C%2Finclude%3E%0A%3C%2Fpara%3E%0A%3C%2Fchapter%3E'
   19     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   22     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   24     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagNameNS'
          8        SEND_VAL_EX                                              'http%3A%2F%2Fwww.w3.org%2F2001%2FXInclude'
          9        SEND_VAL_EX                                              '%2A'
         10        DO_FCALL                                      0  $8      
         11      > FE_RESET_R                                       $9      $8, ->21
         12    > > FE_FETCH_R                                               $9, !2, ->21
   25    13    >   ECHO                                                     'local+name%3A+'
         14        FETCH_OBJ_R                                      ~10     !2, 'localName'
         15        ECHO                                                     ~10
         16        ECHO                                                     '%2C+prefix%3A+'
         17        FETCH_OBJ_R                                      ~11     !2, 'prefix'
         18        ECHO                                                     ~11
         19        ECHO                                                     '%0A'
   24    20      > JMP                                                      ->12
         21    >   FE_FREE                                                  $9
   28    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.4 ms | 1395 KiB | 13 Q