3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.96 ms | 1394 KiB | 13 Q