ID:               27134
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: Slackware Linux
 PHP Version:      4.3.4
 New Comment:

Results are only cached if the underlying stat() call succeeded; since
the file doesn't exist to start off with,
PHP won't cached the information about it not existing.


Previous Comments:
------------------------------------------------------------------------

[2004-02-03 10:22:51] [EMAIL PROTECTED]

I've tested with PHP 5 and it caches in some situations.

If you start running the script without the file, it will output false
till you create it.
If you then delete the file, it continues to echo true.

------------------------------------------------------------------------

[2004-02-03 10:12:19] [EMAIL PROTECTED]

Description:
------------
It seems that results from file_exists() or similar are not being
cached with PHP-CLI. Since I think this is intended behavior this
should be reflected in the manual.

Reproduce code:
---------------
while( TRUE ) {

   var_dump( file_exists( '/tmp/foo' ) );
   sleep( 1 );

} 

Expected result:
----------------
on creating/deleting /tmp/foo the result of file_exists() should not
change since there is no call to clearstatcache()


Actual result:
--------------
actually the output _does_ change


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27134&edit=1

Reply via email to