3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.08 ms | 1400 KiB | 21 Q