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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
10.9 ms | 411 KiB | 7 Q