3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $xml = ' <navPoint playOrder="1" id="np-1"> <navLabel> <text>I</text> </navLabel> <content src="/1.html"/> </navPoint> <navPoint playOrder="2" id="np-2"> <navLabel> <text>II</text> </navLabel> <content src="/2.html"/> </navPoint> '; $doc->loadXML('<root>' . $xml . '</root>'); $output = $doc->getElementsByTagName('navPoint'); print_r($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s8QvM
function name:  (null)
number of ops:  17
compiled vars:  !0 = $doc, !1 = $xml, !2 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN                                                   !1, '%0A++%3CnavPoint+playOrder%3D%221%22+id%3D%22np-1%22%3E%0A++++%3CnavLabel%3E%0A++++++%3Ctext%3EI%3C%2Ftext%3E%0A++++%3C%2FnavLabel%3E%0A++++%3Ccontent+src%3D%22%2F1.html%22%2F%3E%0A++%3C%2FnavPoint%3E%0A++%3CnavPoint+playOrder%3D%222%22+id%3D%22np-2%22%3E%0A++++%3CnavLabel%3E%0A++++++%3Ctext%3EII%3C%2Ftext%3E%0A++++%3C%2FnavLabel%3E%0A++++%3Ccontent+src%3D%22%2F2.html%22%2F%3E%0A++%3C%2FnavPoint%3E%0A'
   19     4        INIT_METHOD_CALL                                         !0, 'loadXML'
          5        CONCAT                                           ~7      '%3Croot%3E', !1
          6        CONCAT                                           ~8      ~7, '%3C%2Froot%3E'
          7        SEND_VAL_EX                                              ~8
          8        DO_FCALL                                      0          
   21     9        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
         10        SEND_VAL_EX                                              'navPoint'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !2, $10
   23    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.39 ms | 1010 KiB | 14 Q