3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $doc->loadXML('<example a="b">Test</example>'); $example = $doc->getElementsByTagName('example')->item(0); $attr = $example->getAttributeNode('a'); var_dump($attr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UiEFg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $doc, !1 = $example, !2 = $attr
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        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Cexample+a%3D%22b%22%3ETest%3C%2Fexample%3E'
          5        DO_FCALL                                      0          
    6     6        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          7        SEND_VAL_EX                                              'example'
          8        DO_FCALL                                      0  $7      
          9        INIT_METHOD_CALL                                         $7, 'item'
         10        SEND_VAL_EX                                              0
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !1, $8
    7    13        INIT_METHOD_CALL                                         !1, 'getAttributeNode'
         14        SEND_VAL_EX                                              'a'
         15        DO_FCALL                                      0  $10     
         16        ASSIGN                                                   !2, $10
    9    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.64 ms | 1395 KiB | 15 Q