3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<node><element>hi</element></node>"; $dom = new DOMDocument(); $dom->loadXML($xml); $ele = $dom->getElementsByTagName('element')->item(0); echo get_class($ele).PHP_EOL; echo get_parent_class($ele).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GSatm
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xml, !1 = $dom, !2 = $ele
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cnode%3E%3Celement%3Ehi%3C%2Felement%3E%3C%2Fnode%3E'
    4     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    6     4        INIT_METHOD_CALL                                         !1, 'loadXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
          8        SEND_VAL_EX                                              'element'
          9        DO_FCALL                                      0  $8      
         10        INIT_METHOD_CALL                                         $8, 'item'
         11        SEND_VAL_EX                                              0
         12        DO_FCALL                                      0  $9      
         13        ASSIGN                                                   !2, $9
   10    14        GET_CLASS                                        ~11     !2
         15        CONCAT                                           ~12     ~11, '%0A'
         16        ECHO                                                     ~12
   12    17        INIT_FCALL                                               'get_parent_class'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $13     
         20        CONCAT                                           ~14     $13, '%0A'
         21        ECHO                                                     ~14
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.18 ms | 1399 KiB | 15 Q