3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$filedir = "upload"; function showDir( $filedir ) { //打开目录 $dir = @ dir($filedir); //列出目录中的文件 while (($file = $dir->read())!==false) //while(($file = readdir($dir)) !== false) { if(is_dir($filedir."/".$file) AND ($file!=".") AND ($file!="..")) { // echo "dirname: ".$file."<br />"; showDir($filedir."/".$file); } else { echo "filename: " .$filedir."/".$file . "<br />"; } } $dir->close(); } showDir("."); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OigE0
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'showdir'
          1        SEND_VAL                                                 '.'
          2        DO_FCALL                                      0          
   21     3      > RETURN                                                   1

Function showdir:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 8
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 8
Branch analysis from position: 36
Branch analysis from position: 8
Branch analysis from position: 19
Branch analysis from position: 16
filename:       /in/OigE0
function name:  showDir
number of ops:  39
compiled vars:  !0 = $filedir, !1 = $dir, !2 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        BEGIN_SILENCE                                    ~3      
          2        INIT_FCALL                                               'dir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        END_SILENCE                                              ~3
          6        ASSIGN                                                   !1, $4
    7     7      > JMP                                                      ->31
   10     8    >   INIT_FCALL                                               'is_dir'
          9        CONCAT                                           ~6      !0, '%2F'
         10        CONCAT                                           ~7      ~6, !2
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13      > JMPZ_EX                                          ~9      $8, ->16
         14    >   IS_NOT_EQUAL                                     ~10     !2, '.'
         15        BOOL                                             ~9      ~10
         16    > > JMPZ_EX                                          ~9      ~9, ->19
         17    >   IS_NOT_EQUAL                                     ~11     !2, '..'
         18        BOOL                                             ~9      ~11
         19    > > JMPZ                                                     ~9, ->26
   12    20    >   INIT_FCALL_BY_NAME                                       'showDir'
         21        CONCAT                                           ~12     !0, '%2F'
         22        CONCAT                                           ~13     ~12, !2
         23        SEND_VAL_EX                                              ~13
         24        DO_FCALL                                      0          
         25      > JMP                                                      ->31
   14    26    >   CONCAT                                           ~15     'filename%3A+', !0
         27        CONCAT                                           ~16     ~15, '%2F'
         28        CONCAT                                           ~17     ~16, !2
         29        CONCAT                                           ~18     ~17, '%3Cbr+%2F%3E'
         30        ECHO                                                     ~18
    7    31    >   INIT_METHOD_CALL                                         !1, 'read'
         32        DO_FCALL                                      0  $19     
         33        ASSIGN                                           ~20     !2, $19
         34        TYPE_CHECK                                  1018          ~20
         35      > JMPNZ                                                    ~21, ->8
   17    36    >   INIT_METHOD_CALL                                         !1, 'close'
         37        DO_FCALL                                      0          
   19    38      > RETURN                                                   null

End of function showdir

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.92 ms | 1403 KiB | 18 Q