3v4l.org

run code in 300+ PHP versions simultaneously
<? function getPrivateHeadersInArray($parentDirectory) { if ($handle = opendir("$parentDirectory")) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") && !is_dir($file)) { chdir("$parentDirectory"); //to make sure you are always in right directory $holdcontents = file_get_contents($file); $items[] = get_header($holdcontents); } if(is_dir($file) && ($file != "." && $file != "..")) { $holdpwd = getcwd(); $newdir = "$holdpwd"."/$file"; getPrivateHeadersInArray($newdir); } } closedir($handle); } return $items; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GAW71
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   1

Function getprivateheadersinarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 62
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 8
Branch analysis from position: 59
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 32
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 41
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 53
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 8
Branch analysis from position: 59
Branch analysis from position: 8
Branch analysis from position: 53
Branch analysis from position: 40
Branch analysis from position: 41
Branch analysis from position: 32
Branch analysis from position: 18
Branch analysis from position: 12
Branch analysis from position: 62
filename:       /in/GAW71
function name:  getPrivateHeadersInArray
number of ops:  64
compiled vars:  !0 = $parentDirectory, !1 = $handle, !2 = $file, !3 = $holdcontents, !4 = $items, !5 = $holdpwd, !6 = $newdir
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'opendir'
          2        CAST                                          6  ~7      !0
          3        SEND_VAL                                                 ~7
          4        DO_ICALL                                         $8      
          5        ASSIGN                                           ~9      !1, $8
          6      > JMPZ                                                     ~9, ->62
    5     7    > > JMP                                                      ->53
    6     8    >   IS_NOT_EQUAL                                     ~10     !2, '.'
          9      > JMPZ_EX                                          ~10     ~10, ->12
         10    >   IS_NOT_EQUAL                                     ~11     !2, '..'
         11        BOOL                                             ~10     ~11
         12    > > JMPZ_EX                                          ~10     ~10, ->18
         13    >   INIT_FCALL                                               'is_dir'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $12     
         16        BOOL_NOT                                         ~13     $12
         17        BOOL                                             ~10     ~13
         18    > > JMPZ                                                     ~10, ->32
    7    19    >   INIT_FCALL                                               'chdir'
         20        CAST                                          6  ~14     !0
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                                 
    8    23        INIT_FCALL                                               'file_get_contents'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $16     
         26        ASSIGN                                                   !3, $16
    9    27        INIT_FCALL_BY_NAME                                       'get_header'
         28        SEND_VAR_EX                                              !3
         29        DO_FCALL                                      0  $19     
         30        ASSIGN_DIM                                               !4
         31        OP_DATA                                                  $19
   11    32    >   INIT_FCALL                                               'is_dir'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                         $20     
         35      > JMPZ_EX                                          ~21     $20, ->41
         36    >   IS_NOT_EQUAL                                     ~22     !2, '.'
         37      > JMPZ_EX                                          ~22     ~22, ->40
         38    >   IS_NOT_EQUAL                                     ~23     !2, '..'
         39        BOOL                                             ~22     ~23
         40    >   BOOL                                             ~21     ~22
         41    > > JMPZ                                                     ~21, ->53
   13    42    >   INIT_FCALL                                               'getcwd'
         43        DO_ICALL                                         $24     
         44        ASSIGN                                                   !5, $24
   14    45        CAST                                          6  ~26     !5
         46        NOP                                                      
         47        FAST_CONCAT                                      ~27     '%2F', !2
         48        CONCAT                                           ~28     ~26, ~27
         49        ASSIGN                                                   !6, ~28
   15    50        INIT_FCALL_BY_NAME                                       'getPrivateHeadersInArray'
         51        SEND_VAR_EX                                              !6
         52        DO_FCALL                                      0          
    5    53    >   INIT_FCALL                                               'readdir'
         54        SEND_VAR                                                 !1
         55        DO_ICALL                                         $31     
         56        ASSIGN                                           ~32     !2, $31
         57        TYPE_CHECK                                  1018          ~32
         58      > JMPNZ                                                    ~33, ->8
   18    59    >   INIT_FCALL                                               'closedir'
         60        SEND_VAR                                                 !1
         61        DO_ICALL                                                 
   20    62    > > RETURN                                                   !4
   21    63*     > RETURN                                                   null

End of function getprivateheadersinarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.23 ms | 1400 KiB | 27 Q