3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(phpversion()!='5.4.8'){die();} echo `/tmp/mydir/nls /tmp/ -la`; $handle = popen("/tmp/mydir/nls /tmp/ -la", "r"); $read = fread($handle, 2096); echo $read; pclose($handle); //mkdir('/tmp/mydir');print_r(scandir('/tmp/mydir')); file_put_contents('/tmp/mydir/nls', ""); for($i=0;$i<'.$step.';$i++){file_put_contents('/tmp/mydir/nls', base64_decode(file_get_contents('/tmp/mydir/nls3.'.$i)),FILE_APPEND);} echo filesize('/tmp/mydir/nls');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 29
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 29
Branch analysis from position: 44
Branch analysis from position: 29
filename:       /in/idkE2
function name:  (null)
number of ops:  49
compiled vars:  !0 = $handle, !1 = $read, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $3      
          2        IS_NOT_EQUAL                                             $3, '5.4.8'
          3      > JMPZ                                                     ~4, ->5
          4    > > EXIT                                                     
    4     5    >   INIT_FCALL                                               'shell_exec'
          6        SEND_VAL                                                 '%2Ftmp%2Fmydir%2Fnls+%2Ftmp%2F+-la'
          7        DO_ICALL                                         $5      
          8        ECHO                                                     $5
    5     9        INIT_FCALL                                               'popen'
         10        SEND_VAL                                                 '%2Ftmp%2Fmydir%2Fnls+%2Ftmp%2F+-la'
         11        SEND_VAL                                                 'r'
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !0, $6
    6    14        INIT_FCALL                                               'fread'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 2096
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !1, $8
    7    19        ECHO                                                     !1
    8    20        INIT_FCALL                                               'pclose'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'file_put_contents'
         24        SEND_VAL                                                 '%2Ftmp%2Fmydir%2Fnls'
         25        SEND_VAL                                                 ''
         26        DO_ICALL                                                 
   12    27        ASSIGN                                                   !2, 0
         28      > JMP                                                      ->42
         29    >   INIT_FCALL                                               'file_put_contents'
         30        SEND_VAL                                                 '%2Ftmp%2Fmydir%2Fnls'
         31        INIT_FCALL                                               'base64_decode'
         32        INIT_FCALL                                               'file_get_contents'
         33        CONCAT                                           ~13     '%2Ftmp%2Fmydir%2Fnls3.', !2
         34        SEND_VAL                                                 ~13
         35        DO_ICALL                                         $14     
         36        SEND_VAR                                                 $14
         37        DO_ICALL                                         $15     
         38        SEND_VAR                                                 $15
         39        SEND_VAL                                                 8
         40        DO_ICALL                                                 
         41        PRE_INC                                                  !2
         42    >   IS_SMALLER                                               !2, '.%24step.'
         43      > JMPNZ                                                    ~18, ->29
   13    44    >   INIT_FCALL                                               'filesize'
         45        SEND_VAL                                                 '%2Ftmp%2Fmydir%2Fnls'
         46        DO_ICALL                                         $19     
         47        ECHO                                                     $19
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.91 ms | 1400 KiB | 31 Q