3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir="."; if ( file_exists("/etc/hosts") ){ echo "This is a linux system\n"; if(is_callable("system")){ echo "System is available\n"; $files=scandir($dir); print_r($files); }elseif(is_callable("shell_exec")){ echo "Shell_exec is available\n"; }elseif(is_callable("exec")){ echo "exec is available\n"; }else{ echo "No dice:(";} }else{ echo "blah!\n\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 33
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bqgVd
function name:  (null)
number of ops:  35
compiled vars:  !0 = $dir, !1 = $files
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '.'
    3     1        INIT_FCALL                                               'file_exists'
          2        SEND_VAL                                                 '%2Fetc%2Fhosts'
          3        DO_ICALL                                         $3      
          4      > JMPZ                                                     $3, ->33
    4     5    >   ECHO                                                     'This+is+a+linux+system%0A'
    5     6        INIT_FCALL                                               'is_callable'
          7        SEND_VAL                                                 'system'
          8        DO_ICALL                                         $4      
          9      > JMPZ                                                     $4, ->19
         10    >   ECHO                                                     'System+is+available%0A'
         11        INIT_FCALL                                               'scandir'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        ASSIGN                                                   !1, $5
         15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > JMP                                                      ->32
    6    19    >   INIT_FCALL                                               'is_callable'
         20        SEND_VAL                                                 'shell_exec'
         21        DO_ICALL                                         $8      
         22      > JMPZ                                                     $8, ->25
         23    >   ECHO                                                     'Shell_exec+is+available%0A'
         24      > JMP                                                      ->32
    7    25    >   INIT_FCALL                                               'is_callable'
         26        SEND_VAL                                                 'exec'
         27        DO_ICALL                                         $9      
         28      > JMPZ                                                     $9, ->31
         29    >   ECHO                                                     'exec+is+available%0A'
         30      > JMP                                                      ->32
    8    31    >   ECHO                                                     'No+dice%3A%28'
         32    > > JMP                                                      ->34
   10    33    >   ECHO                                                     'blah%21%0A%0A'
   13    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.41 ms | 1400 KiB | 21 Q