3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dom = new DOMDocument; $dom->loadXML('<schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>'); $dummy = new DOMDocument; $dummy->loadXML('<element xmlns="http://www.w3.org/2001/XMLSchema" name="username" type="string"/>'); $dom->documentElement->appendChild($dom->importNode($dummy->documentElement)); echo $dom->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSDmO
function name:  (null)
number of ops:  25
compiled vars:  !0 = $dom, !1 = $dummy
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'DOMDocument'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    4     3        INIT_METHOD_CALL                                             !0, 'loadXML'
          4        SEND_VAL_EX                                                  '%3Cschema+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%2F%3E'
          5        DO_FCALL                                          0          
    6     6        NEW                                                  $6      'DOMDocument'
          7        DO_FCALL                                          0          
          8        ASSIGN                                                       !1, $6
    7     9        INIT_METHOD_CALL                                             !1, 'loadXML'
         10        SEND_VAL_EX                                                  '%3Celement+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22+name%3D%22username%22+type%3D%22string%22%2F%3E'
         11        DO_FCALL                                          0          
    8    12        FETCH_OBJ_R                                          ~10     !0, 'documentElement'
         13        INIT_METHOD_CALL                                             ~10, 'appendChild'
         14        INIT_METHOD_CALL                                             !0, 'importNode'
         15        CHECK_FUNC_ARG                                               
         16        FETCH_OBJ_FUNC_ARG                                   $11     !1, 'documentElement'
         17        SEND_FUNC_ARG                                                $11
         18        DO_FCALL                                          0  $12     
         19        SEND_VAR_NO_REF_EX                                           $12
         20        DO_FCALL                                          0          
   10    21        INIT_METHOD_CALL                                             !0, 'saveXML'
         22        DO_FCALL                                          0  $14     
         23        ECHO                                                         $14
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.18 ms | 1596 KiB | 13 Q