3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xml = new DOMDocument; $xslt = $xml->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="xml2html.xsl"'); $xml->appendChild($xslt); $xml->appendChild( $xml->importNode( (new DOMDocument)->loadXml('<foo>Foo</foo>') ) ); echo $xml->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9JCg
function name:  (null)
number of ops:  26
compiled vars:  !0 = $xml, !1 = $xslt
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, 'createProcessingInstruction'
          4        SEND_VAL_EX                                                  'xml-stylesheet'
          5        SEND_VAL_EX                                                  'type%3D%22text%2Fxsl%22+href%3D%22xml2html.xsl%22'
          6        DO_FCALL                                          0  $5      
          7        ASSIGN                                                       !1, $5
    5     8        INIT_METHOD_CALL                                             !0, 'appendChild'
          9        SEND_VAR_EX                                                  !1
         10        DO_FCALL                                          0          
    7    11        INIT_METHOD_CALL                                             !0, 'appendChild'
    8    12        INIT_METHOD_CALL                                             !0, 'importNode'
    9    13        NEW                                                  $8      'DOMDocument'
         14        DO_FCALL                                          0          
         15        INIT_METHOD_CALL                                             $8, 'loadXml'
         16        SEND_VAL_EX                                                  '%3Cfoo%3EFoo%3C%2Ffoo%3E'
         17        DO_FCALL                                          0  $10     
         18        SEND_VAR_NO_REF_EX                                           $10
    8    19        DO_FCALL                                          0  $11     
    9    20        SEND_VAR_NO_REF_EX                                           $11
    7    21        DO_FCALL                                          0          
   13    22        INIT_METHOD_CALL                                             !0, 'saveXML'
         23        DO_FCALL                                          0  $13     
         24        ECHO                                                         $13
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.41 ms | 2345 KiB | 13 Q