3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument("1.0"); $node = $doc->createElement("select"); $newnode = $doc->appendChild($node); $newnode->setAttribute("selected1", ''); var_dump($doc->saveHTML());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CQ7CU
function name:  (null)
number of ops:  22
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                                              'select'
          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                                              'selected1'
         14        SEND_VAL_EX                                              ''
         15        DO_FCALL                                      0          
    8    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !0, 'saveHTML'
         18        DO_FCALL                                      0  $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.96 ms | 1395 KiB | 15 Q