3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.66 ms | 1395 KiB | 15 Q