3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns:foo="http://example.com/foo"> <body> <span foo:cat="quz">Hello</span> </body> </html> XML; $dom = new DOMDocument(); $dom->loadXml($xml); foreach ($dom->getElementsByTagName('bar') as $bar) { echo $bar->getAttributeNS('http://example.com/foo', 'cat'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/bZe0G
function name:  (null)
number of ops:  20
compiled vars:  !0 = $xml, !1 = $dom, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Strict%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-strict.dtd%22%3E%0A%3Chtml+xmlns%3Afoo%3D%22http%3A%2F%2Fexample.com%2Ffoo%22%3E%0A++%3Cbody%3E%0A++++%3Cspan+foo%3Acat%3D%22quz%22%3EHello%3C%2Fspan%3E%0A++%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   12     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   13     4        INIT_METHOD_CALL                                         !1, 'loadXml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   15     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'bar'
          9        DO_FCALL                                      0  $8      
         10      > FE_RESET_R                                       $9      $8, ->18
         11    > > FE_FETCH_R                                               $9, !2, ->18
   16    12    >   INIT_METHOD_CALL                                         !2, 'getAttributeNS'
         13        SEND_VAL_EX                                              'http%3A%2F%2Fexample.com%2Ffoo'
         14        SEND_VAL_EX                                              'cat'
         15        DO_FCALL                                      0  $10     
         16        ECHO                                                     $10
   15    17      > JMP                                                      ->11
         18    >   FE_FREE                                                  $9
   17    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.04 ms | 1394 KiB | 13 Q