3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 使用表格浏览目录的结构 print("<TABLE BORDER=\"1\">\n"); // 创建表格的头 print("<TR><font bgcolor='red'>\n"); print("<TH><font color='red' size=3 >文件名</font></TH>\n"); print("<TH><font color='red' size=3 >文件的大小</font></TH>\n"); print("</font></TR>\n"); $myDirectory = opendir("."); // 建立操作目录的句柄 // 读出目录中的每一个子项 while($entryName = readdir($myDirectory)) { print("<TR>"); print("<TD>$entryName</TD>"); print("<TD ALIGN=\"right\">"); $size=filesize($entryName); if($size <1024) { $FileSize = (string)$size . "字节";} elseif($size <(1024 * 1024)) { $FileSize = number_format((double)($size / 1024), 2) . " KB"; } else { $FileSize = number_format((double)($size/(1024*1024)),2)."MB"; } print($FileSize); print("</TD>"); print("</TR>\n"); } closedir($myDirectory); // 关闭目录 print("</TABLE>\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Branch analysis from position: 10
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 37
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Branch analysis from position: 10
filename:       /in/rWbEQ
function name:  (null)
number of ops:  58
compiled vars:  !0 = $myDirectory, !1 = $entryName, !2 = $size, !3 = $FileSize
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%3CTABLE+BORDER%3D%221%22%3E%0A'
    5     1        ECHO                                                     '%3CTR%3E%3Cfont+bgcolor%3D%27red%27%3E%0A'
    6     2        ECHO                                                     '%3CTH%3E%3Cfont+color%3D%27red%27+size%3D3+%3E%E6%96%87%E4%BB%B6%E5%90%8D%3C%2Ffont%3E%3C%2FTH%3E%0A'
    7     3        ECHO                                                     '%3CTH%3E%3Cfont+color%3D%27red%27+size%3D3+%3E%E6%96%87%E4%BB%B6%E7%9A%84%E5%A4%A7%E5%B0%8F%3C%2Ffont%3E%3C%2FTH%3E%0A'
    8     4        ECHO                                                     '%3C%2Ffont%3E%3C%2FTR%3E%0A'
    9     5        INIT_FCALL                                               'opendir'
          6        SEND_VAL                                                 '.'
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
   11     9      > JMP                                                      ->48
   13    10    >   ECHO                                                     '%3CTR%3E'
   14    11        ROPE_INIT                                     3  ~7      '%3CTD%3E'
         12        ROPE_ADD                                      1  ~7      ~7, !1
         13        ROPE_END                                      2  ~6      ~7, '%3C%2FTD%3E'
         14        ECHO                                                     ~6
   15    15        ECHO                                                     '%3CTD+ALIGN%3D%22right%22%3E'
   16    16        INIT_FCALL                                               'filesize'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19        ASSIGN                                                   !2, $9
   17    20        IS_SMALLER                                               !2, 1024
         21      > JMPZ                                                     ~11, ->26
   18    22    >   CAST                                          6  ~12     !2
         23        CONCAT                                           ~13     ~12, '%E5%AD%97%E8%8A%82'
         24        ASSIGN                                                   !3, ~13
         25      > JMP                                                      ->45
   19    26    >   IS_SMALLER                                               !2, 1048576
         27      > JMPZ                                                     ~15, ->37
   21    28    >   INIT_FCALL                                               'number_format'
         29        DIV                                              ~16     !2, 1024
         30        CAST                                          5  ~17     ~16
         31        SEND_VAL                                                 ~17
         32        SEND_VAL                                                 2
         33        DO_ICALL                                         $18     
         34        CONCAT                                           ~19     $18, '+KB'
         35        ASSIGN                                                   !3, ~19
         36      > JMP                                                      ->45
   25    37    >   INIT_FCALL                                               'number_format'
         38        DIV                                              ~21     !2, 1048576
         39        CAST                                          5  ~22     ~21
         40        SEND_VAL                                                 ~22
         41        SEND_VAL                                                 2
         42        DO_ICALL                                         $23     
         43        CONCAT                                           ~24     $23, 'MB'
         44        ASSIGN                                                   !3, ~24
   27    45    >   ECHO                                                     !3
   28    46        ECHO                                                     '%3C%2FTD%3E'
   29    47        ECHO                                                     '%3C%2FTR%3E%0A'
   11    48    >   INIT_FCALL                                               'readdir'
         49        SEND_VAR                                                 !0
         50        DO_ICALL                                         $26     
         51        ASSIGN                                           ~27     !1, $26
         52      > JMPNZ                                                    ~27, ->10
   31    53    >   INIT_FCALL                                               'closedir'
         54        SEND_VAR                                                 !0
         55        DO_ICALL                                                 
   32    56        ECHO                                                     '%3C%2FTABLE%3E%0A'
         57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.68 ms | 1400 KiB | 23 Q