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); echo $dom->saveHtml(); 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 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/tBfu1
function name:  (null)
number of ops:  23
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, 'saveHtml'
          8        DO_FCALL                                      0  $8      
          9        ECHO                                                     $8
   17    10        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         11        SEND_VAL_EX                                              'bar'
         12        DO_FCALL                                      0  $9      
         13      > FE_RESET_R                                       $10     $9, ->21
         14    > > FE_FETCH_R                                               $10, !2, ->21
   18    15    >   INIT_METHOD_CALL                                         !2, 'getAttributeNS'
         16        SEND_VAL_EX                                              'http%3A%2F%2Fexample.com%2Ffoo'
         17        SEND_VAL_EX                                              'cat'
         18        DO_FCALL                                      0  $11     
         19        ECHO                                                     $11
   17    20      > JMP                                                      ->14
         21    >   FE_FREE                                                  $10
   19    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.14 ms | 1394 KiB | 13 Q