3v4l.org

run code in 300+ PHP versions simultaneously
<?php $buffer = <<<XML <?xml version="1.0"?> <!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); $xml->asXML('php://output'); $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/ICCYc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $buffer, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%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'
   12     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   13     5        INIT_METHOD_CALL                                         !1, 'asXML'
          6        SEND_VAL_EX                                              'php%3A%2F%2Foutput'
          7        DO_FCALL                                      0          
   15     8        INIT_FCALL                                               'simplexml_load_string'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'SimpleXMLElement'
         11        SEND_VAL                                                 2
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
   16    14        INIT_METHOD_CALL                                         !1, 'asXML'
         15        SEND_VAL_EX                                              'php%3A%2F%2Foutput'
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.82 ms | 1395 KiB | 15 Q