3v4l.org

run code in 500+ PHP versions simultaneously
<?php $doc = new DOMDocument("1.0"); $node = $doc->createElement("para"); $newnode = $doc->appendChild($node); $newnode->setAttribute("align", NULL); var_dump($newnode->getAttribute("align"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IWGqr
function name:  (null)
number of ops:  23
compiled vars:  !0 = $doc, !1 = $node, !2 = $newnode
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'DOMDocument'
          1        SEND_VAL_EX                                                  '1.0'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
    4     4        INIT_METHOD_CALL                                             !0, 'createElement'
          5        SEND_VAL_EX                                                  'para'
          6        DO_FCALL                                          0  $6      
          7        ASSIGN                                                       !1, $6
    5     8        INIT_METHOD_CALL                                             !0, 'appendChild'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0  $8      
         11        ASSIGN                                                       !2, $8
    6    12        INIT_METHOD_CALL                                             !2, 'setAttribute'
         13        SEND_VAL_EX                                                  'align'
         14        SEND_VAL_EX                                                  null
         15        DO_FCALL                                          0          
    7    16        INIT_FCALL                                                   'var_dump'
         17        INIT_METHOD_CALL                                             !2, 'getAttribute'
         18        SEND_VAL_EX                                                  'align'
         19        DO_FCALL                                          0  $11     
         20        SEND_VAR                                                     $11
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
145.99 ms | 2039 KiB | 14 Q