3v4l.org

run code in 300+ PHP versions simultaneously
<?php $DOMDocumentNode = new DOMDocument(); $DOMDocumentNode->loadXML('<example a="b">Test</example>'); $DOMElementNode = $DOMDocumentNode->documentElement; $DOMAttributeNode = $DOMElementNode->getAttributeNode('a'); $DOMTextNode = $DOMElementNode->firstChild; var_dump($DOMDocumentNode, $DOMElementNode, $DOMAttributeNode, $DOMTextNode);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VTiWk
function name:  (null)
number of ops:  21
compiled vars:  !0 = $DOMDocumentNode, !1 = $DOMElementNode, !2 = $DOMAttributeNode, !3 = $DOMTextNode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        INIT_METHOD_CALL                                         !0, 'loadXML'
          4        SEND_VAL_EX                                              '%3Cexample+a%3D%22b%22%3ETest%3C%2Fexample%3E'
          5        DO_FCALL                                      0          
    4     6        FETCH_OBJ_R                                      ~8      !0, 'documentElement'
          7        ASSIGN                                                   !1, ~8
    5     8        INIT_METHOD_CALL                                         !1, 'getAttributeNode'
          9        SEND_VAL_EX                                              'a'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !2, $10
    6    12        FETCH_OBJ_R                                      ~12     !1, 'firstChild'
         13        ASSIGN                                                   !3, ~12
    8    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
211.83 ms | 1395 KiB | 15 Q