3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument("1.0", "UF-8"); $el = $xml->createElement("testnode", "some val"); $xml->appendChild($el); echo "<xmp>" . $xml->saveXML() . "</xmp>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KXDDL
function name:  (null)
number of ops:  19
compiled vars:  !0 = $xml, !1 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        SEND_VAL_EX                                              '1.0'
          2        SEND_VAL_EX                                              'UF-8'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    4     5        INIT_METHOD_CALL                                         !0, 'createElement'
          6        SEND_VAL_EX                                              'testnode'
          7        SEND_VAL_EX                                              'some+val'
          8        DO_FCALL                                      0  $5      
          9        ASSIGN                                                   !1, $5
    5    10        INIT_METHOD_CALL                                         !0, 'appendChild'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
    6    13        INIT_METHOD_CALL                                         !0, 'saveXML'
         14        DO_FCALL                                      0  $8      
         15        CONCAT                                           ~9      '%3Cxmp%3E', $8
         16        CONCAT                                           ~10     ~9, '%3C%2Fxmp%3E'
         17        ECHO                                                     ~10
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.87 ms | 1393 KiB | 13 Q