3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); $document = new DOMDocument(); $document->loadXML('<x a="foo"/>'); /** @var DOMElement $element */ $element = $document->documentElement; $attribute = $element->getAttributeNode('a'); $element->removeAttributeNode($attribute); var_dump($document->saveHTML());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dbST3
function name:  (null)
number of ops:  21
compiled vars:  !0 = $document, !1 = $element, !2 = $attribute
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                                                  '%3Cx+a%3D%22foo%22%2F%3E'
          5        DO_FCALL                                          0          
    6     6        FETCH_OBJ_R                                          ~7      !0, 'documentElement'
          7        ASSIGN                                                       !1, ~7
    7     8        INIT_METHOD_CALL                                             !1, 'getAttributeNode'
          9        SEND_VAL_EX                                                  'a'
         10        DO_FCALL                                          0  $9      
         11        ASSIGN                                                       !2, $9
    8    12        INIT_METHOD_CALL                                             !1, 'removeAttributeNode'
         13        SEND_VAR_EX                                                  !2
         14        DO_FCALL                                          0          
    9    15        INIT_FCALL                                                   'var_dump'
         16        INIT_METHOD_CALL                                             !0, 'saveHTML'
         17        DO_FCALL                                          0  $12     
         18        SEND_VAR                                                     $12
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.13 ms | 3306 KiB | 14 Q