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); 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/1oijZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $me, !1 = $xml, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fin%2F1oijZ'
    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        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
   13    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   14    13        ECHO                                                     '%0A'
   15    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'base64_decode'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $11     
         18        SEND_VAR                                                 $11
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
124.64 ms | 1445 KiB | 16 Q