3v4l.org

run code in 300+ PHP versions simultaneously
<?php $buffer = <<<XML <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE foo [ <!ELEMENT foo ANY > <!ENTITY xxe SYSTEM "data://text/plain,test" >]><foo>&xxe;</foo> XML; libxml_disable_entity_loader(false); $xml = simplexml_load_string($buffer, 'SimpleXMLElement', LIBXML_NOENT); $xml->asXML('php://output');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQekc
function name:  (null)
number of ops:  14
compiled vars:  !0 = $buffer, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22ISO-8859-1%22%3F%3E%0A+%3C%21DOCTYPE+foo+%5B++%0A++%3C%21ELEMENT+foo+ANY+%3E%0A++%3C%21ENTITY+xxe+SYSTEM+%22data%3A%2F%2Ftext%2Fplain%2Ctest%22+%3E%5D%3E%3Cfoo%3E%26xxe%3B%3C%2Ffoo%3E'
   10     1        INIT_FCALL                                               'libxml_disable_entity_loader'
          2        SEND_VAL                                                 <false>
          3        DO_FCALL_BY_NAME                                         
   11     4        INIT_FCALL                                               'simplexml_load_string'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'SimpleXMLElement'
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   12    10        INIT_METHOD_CALL                                         !1, 'asXML'
         11        SEND_VAL_EX                                              'php%3A%2F%2Foutput'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1394 KiB | 17 Q