3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dom = new \DOMDocument(); $root = $dom->createElementNS('http://example.com', 'root'); $dom->appendChild($root); $a1 = $dom->createElementNS('http://example.com', 'a'); $a1->appendChild($dom->createElementNS('http://example.com', 'b')); $root->appendChild($a1); $a2 = $dom->createElementNS('http://example.com', 'a'); $a2->appendChild($dom->createElementNS('http://example.com', 'b')); $root->appendChild($a2); echo $dom->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hAXOS
function name:  (null)
number of ops:  45
compiled vars:  !0 = $dom, !1 = $root, !2 = $a1, !3 = $a2
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, 'createElementNS'
          4        SEND_VAL_EX                                                  'http%3A%2F%2Fexample.com'
          5        SEND_VAL_EX                                                  'root'
          6        DO_FCALL                                          0  $7      
          7        ASSIGN                                                       !1, $7
    5     8        INIT_METHOD_CALL                                             !0, 'appendChild'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
    7    11        INIT_METHOD_CALL                                             !0, 'createElementNS'
         12        SEND_VAL_EX                                                  'http%3A%2F%2Fexample.com'
         13        SEND_VAL_EX                                                  'a'
         14        DO_FCALL                                          0  $10     
         15        ASSIGN                                                       !2, $10
    8    16        INIT_METHOD_CALL                                             !2, 'appendChild'
         17        INIT_METHOD_CALL                                             !0, 'createElementNS'
         18        SEND_VAL_EX                                                  'http%3A%2F%2Fexample.com'
         19        SEND_VAL_EX                                                  'b'
         20        DO_FCALL                                          0  $12     
         21        SEND_VAR_NO_REF_EX                                           $12
         22        DO_FCALL                                          0          
    9    23        INIT_METHOD_CALL                                             !1, 'appendChild'
         24        SEND_VAR_EX                                                  !2
         25        DO_FCALL                                          0          
   11    26        INIT_METHOD_CALL                                             !0, 'createElementNS'
         27        SEND_VAL_EX                                                  'http%3A%2F%2Fexample.com'
         28        SEND_VAL_EX                                                  'a'
         29        DO_FCALL                                          0  $15     
         30        ASSIGN                                                       !3, $15
   12    31        INIT_METHOD_CALL                                             !3, 'appendChild'
         32        INIT_METHOD_CALL                                             !0, 'createElementNS'
         33        SEND_VAL_EX                                                  'http%3A%2F%2Fexample.com'
         34        SEND_VAL_EX                                                  'b'
         35        DO_FCALL                                          0  $17     
         36        SEND_VAR_NO_REF_EX                                           $17
         37        DO_FCALL                                          0          
   13    38        INIT_METHOD_CALL                                             !1, 'appendChild'
         39        SEND_VAR_EX                                                  !3
         40        DO_FCALL                                          0          
   15    41        INIT_METHOD_CALL                                             !0, 'saveXML'
         42        DO_FCALL                                          0  $20     
         43        ECHO                                                         $20
         44      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.23 ms | 1797 KiB | 13 Q