3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.27 ms | 1400 KiB | 21 Q