3v4l.org

run code in 300+ PHP versions simultaneously
<?php posix_setuid(0); $str = file_get_contents('/etc/passwd'); var_dump($str); var_dump(unlink('/etc/passwd')); $str = file_get_contents('/etc/passwd'); var_dump($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kBuGL
function name:  (null)
number of ops:  24
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'posix_setuid'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'file_get_contents'
          4        SEND_VAL                                                 '%2Fetc%2Fpasswd'
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    5    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'unlink'
         12        SEND_VAL                                                 '%2Fetc%2Fpasswd'
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'file_get_contents'
         17        SEND_VAL                                                 '%2Fetc%2Fpasswd'
         18        DO_ICALL                                         $7      
         19        ASSIGN                                                   !0, $7
    8    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.66 ms | 1395 KiB | 21 Q