3v4l.org

run code in 300+ PHP versions simultaneously
<?php $me = __FILE__; $xml = <<<ENDOFXML <!DOCTYPE root [ <!ENTITY foo SYSTEM "php://filter/convert.base64-encode/resource=$me"> ]> <foo>&foo;</foo> ENDOFXML; echo "libxml version: " . LIBXML_DOTTED_VERSION . "\n\n"; $s = simplexml_load_string($xml, null, LIBXML_NOENT); var_dump($s); echo "\n"; var_dump(base64_decode($s));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2JfFn
function name:  (null)
number of ops:  23
compiled vars:  !0 = $me, !1 = $xml, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fin%2F2JfFn'
    4     1        ROPE_INIT                                     3  ~5      '%3C%21DOCTYPE+root%0A%5B%0A%3C%21ENTITY+foo+SYSTEM+%22php%3A%2F%2Ffilter%2Fconvert.base64-encode%2Fresource%3D'
    6     2        ROPE_ADD                                      1  ~5      ~5, !0
          3        ROPE_END                                      2  ~4      ~5, '%22%3E%0A%5D%3E%0A%3Cfoo%3E%26foo%3B%3C%2Ffoo%3E'
    3     4        ASSIGN                                                   !1, ~4
   11     5        ECHO                                                     'libxml+version%3A+2.9.4%0A%0A'
   12     6        INIT_FCALL                                               'simplexml_load_string'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 null
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
   13    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   14    15        ECHO                                                     '%0A'
   15    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'base64_decode'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.36 ms | 1445 KiB | 16 Q