ID: 31983 User updated by: admin at ff dot st Reported By: admin at ff dot st Status: Open Bug Type: Documentation problem Operating System: PHP Website PHP Version: Irrelevant New Comment:
Expected result : please read "If fstat() documentation was correct..." instead of clearstatcache. Previous Comments: ------------------------------------------------------------------------ [2005-02-15 11:44:03] admin at ff dot st Description: ------------ The documentation of fstat (http://www.php.net/manual/en/function.fstat.php) shows a note : "Note: The results of this function are cached. See clearstatcache() for more details.". However clearstatcache's documentation (http://www.php.net/manual/en/function.clearstatcache.php) does not list fstat in the list of affected functions. After a test with PHP 4.3.10 (Win32), it seems that fstat is *not* cached. Reproduce code: --------------- <?php touch('TEST.BIN'); // make sure this file exists $fp=fopen('TEST.BIN','r+b'); ftruncate($fp,0); $stat=fstat($fp); echo $stat['size']."\n"; fwrite($fp,"TEST"); $stat=fstat($fp); echo $stat['size']."\n"; fclose($fp); unlink('TEST.BIN'); Expected result: ---------------- If clearstatcache documentation was correct we should receive : 0 0 Actual result: -------------- Actually the code shows : 0 4 fstat() documentation is not correct : the function is not cached (at least for normal file streams) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31983&edit=1
