3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); $node1 = $xml->createElement("node"); $node1->setAttribute('anything', 'whatever'); $text = new DOMText('**'); $node2 = $xml->createElement("node"); $node2->setAttribute('another', 'example'); $xml->appendChild($node1); $xml->appendChild($text); $xml->appendChild($node2); echo $xml->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1kMMD
function name:  (null)
number of ops:  36
compiled vars:  !0 = $xml, !1 = $node1, !2 = $text, !3 = $node2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        INIT_METHOD_CALL                                         !0, 'createElement'
          4        SEND_VAL_EX                                              'node'
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
    5     7        INIT_METHOD_CALL                                         !1, 'setAttribute'
          8        SEND_VAL_EX                                              'anything'
          9        SEND_VAL_EX                                              'whatever'
         10        DO_FCALL                                      0          
    6    11        NEW                                              $10     'DOMText'
         12        SEND_VAL_EX                                              '%2A%2A'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
    7    15        INIT_METHOD_CALL                                         !0, 'createElement'
         16        SEND_VAL_EX                                              'node'
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                                   !3, $13
    8    19        INIT_METHOD_CALL                                         !3, 'setAttribute'
         20        SEND_VAL_EX                                              'another'
         21        SEND_VAL_EX                                              'example'
         22        DO_FCALL                                      0          
    9    23        INIT_METHOD_CALL                                         !0, 'appendChild'
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0          
   10    26        INIT_METHOD_CALL                                         !0, 'appendChild'
         27        SEND_VAR_EX                                              !2
         28        DO_FCALL                                      0          
   11    29        INIT_METHOD_CALL                                         !0, 'appendChild'
         30        SEND_VAR_EX                                              !3
         31        DO_FCALL                                      0          
   12    32        INIT_METHOD_CALL                                         !0, 'saveXML'
         33        DO_FCALL                                      0  $19     
         34        ECHO                                                     $19
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
259.46 ms | 1008 KiB | 14 Q