3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1394 KiB | 13 Q