3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $doc->loadXML('<example a="b">Test</example>'); $el = $doc->documentElement; $at = $el->getAttributeNode('a'); $tx = $el->firstChild; var_dump($doc); var_dump($el); var_dump($at); var_dump($tx);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bDMdb
function name:  (null)
number of ops:  27
compiled vars:  !0 = $doc, !1 = $el, !2 = $at, !3 = $tx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    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        FETCH_OBJ_R                                      ~8      !0, 'documentElement'
          7        ASSIGN                                                   !1, ~8
    8     8        INIT_METHOD_CALL                                         !1, 'getAttributeNode'
          9        SEND_VAL_EX                                              'a'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
   10    12        FETCH_OBJ_R                                      ~12     !1, 'firstChild'
         13        ASSIGN                                                   !3, ~12
   14    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   16    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   18    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
   20    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.62 ms | 1395 KiB | 15 Q