3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom=simplexml_load_string("<test></test>"); $dom->addChild(">.<","1,2,3"); $xml=$dom->asXML(); echo $xml; /* echos: <?xml version="1.0"?> <test><3D>1,2,3</3D></test> */ $dom=simplexml_load_string($xml); /* generates a whole lots of warnings, and refuses to create an object. */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6KQ78
function name:  (null)
number of ops:  17
compiled vars:  !0 = $dom, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'simplexml_load_string'
          1        SEND_VAL                                                 '%3Ctest%3E%3C%2Ftest%3E'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        INIT_METHOD_CALL                                         !0, 'addChild'
          5        SEND_VAL_EX                                              '%3E.%3C'
          6        SEND_VAL_EX                                              '1%2C2%2C3'
          7        DO_FCALL                                      0          
    5     8        INIT_METHOD_CALL                                         !0, 'asXML'
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !1, $5
    6    11        ECHO                                                     !1
   12    12        INIT_FCALL                                               'simplexml_load_string'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !0, $7
   16    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.23 ms | 1394 KiB | 15 Q