3v4l.org

run code in 500+ PHP versions simultaneously
<?php //libxml_disable_entity_loader(true); $dom = new DOMDocument; $dom->substituteEntities = true; $dom->loadXML( <<<'EOXML' <!DOCTYPE x [ <!ENTITY good "(good)"> <!ENTITY bad SYSTEM "/etc/passwd"> ]> <x> <good>&good;</good> <bad>&bad;</bad> </x> EOXML ); echo $dom->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Z5bd
function name:  (null)
number of ops:  12
compiled vars:  !0 = $dom
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $1      'DOMDocument'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
    6     3        ASSIGN_OBJ                                                   !0, 'substituteEntities'
          4        OP_DATA                                                      <true>
    7     5        INIT_METHOD_CALL                                             !0, 'loadXML'
    9     6        SEND_VAL_EX                                                  '%3C%21DOCTYPE+x+%5B%0A++++%3C%21ENTITY+good+%22%28good%29%22%3E%0A++++%3C%21ENTITY+bad+SYSTEM+%22%2Fetc%2Fpasswd%22%3E%0A%5D%3E%0A%3Cx%3E%0A++++%3Cgood%3E%26good%3B%3C%2Fgood%3E%0A++++%3Cbad%3E%26bad%3B%3C%2Fbad%3E%0A%3C%2Fx%3E'
    7     7        DO_FCALL                                          0          
   20     8        INIT_METHOD_CALL                                             !0, 'saveXML'
          9        DO_FCALL                                          0  $6      
         10        ECHO                                                         $6
         11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
189.09 ms | 2131 KiB | 13 Q