ID: 31115 User updated by: tony2001 at phpclub dot net Reported By: tony2001 at phpclub dot net Status: Bogus Bug Type: Documentation problem Operating System: Linux PHP Version: 5CVS-2004-12-16 (dev) New Comment:
Uh. Yeah, I need coffee, that's definitely true =) Thanks, Mehdi. Previous Comments: ------------------------------------------------------------------------ [2004-12-20 03:23:54] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php the example have a comment just before the print_r : // print only the associative part print_r(array_slice($fstat, 13)); plus the docs clearly tells you to see scan() docs for the output format, and the numeric indexes are described there. not enough coffee ? :) ------------------------------------------------------------------------ [2004-12-16 11:11:45] tony2001 at phpclub dot net Description: ------------ fstat() returns result array with both associative & numerics indexes, but documentation says only about associative ones. Reproduce code: --------------- <?php $fp = fopen(__FILE__,'r'); var_dump(fstat($fp)); ?> Expected result: ---------------- Array ( [dev] => 771 [ino] => 488704 [mode] => 33188 [nlink] => 1 [uid] => 0 [gid] => 0 [rdev] => 0 [size] => 1114 [atime] => 1061067181 [mtime] => 1056136526 [ctime] => 1056136526 [blksize] => 4096 [blocks] => 8 ) Actual result: -------------- array(26) { [0]=> int(773) [1]=> int(115763) [2]=> int(33188) [3]=> int(1) [4]=> int(0) [5]=> int(0) [6]=> int(0) [7]=> int(77) [8]=> int(1103191522) [9]=> int(1103191522) [10]=> int(1103191522) [11]=> int(4096) [12]=> int(8) ["dev"]=> int(773) ["ino"]=> int(115763) ["mode"]=> int(33188) ["nlink"]=> int(1) ["uid"]=> int(0) ["gid"]=> int(0) ["rdev"]=> int(0) ["size"]=> int(77) ["atime"]=> int(1103191522) ["mtime"]=> int(1103191522) ["ctime"]=> int(1103191522) ["blksize"]=> int(4096) ["blocks"]=> int(8) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31115&edit=1
