#31115 [NEW]: fstat() returns array with both associative & numeric indexes
| From: | tony2001 at phpclub dot net | Date: | Thu, 16 Dec 2004 10:11:46 +0000 |
| Subject: | #31115 [NEW]: fstat() returns array with both associative & numeric indexes | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969365476@lists.php.net to get a copy of this message | ||
From: tony2001 at phpclub dot net
Operating system: Linux
PHP version: 5CVS-2004-12-16 (dev)
PHP Bug Type: Documentation problem
Bug description: fstat() returns array with both associative & numeric indexes
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 bug report at http://bugs.php.net/?id=31115&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31115&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31115&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31115&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31115&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31115&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31115&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31115&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31115&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31115&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31115&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31115&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31115&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31115&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31115&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31115&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31115&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31115&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31115&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31115&r=mysqlcfg