#27134 [Opn]: PHP CLI does not cache results of file_exists()

From: Date: Tue, 03 Feb 2004 15:22:52 +0000
Subject: #27134 [Opn]: PHP CLI does not cache results of file_exists()
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969358709@lists.php.net to get a copy of this message
ID: 27134 Updated by: nlopess@php.net Reported By: jaenecke@php.net Status: Open Bug Type: Documentation problem Operating System: Slackware Linux PHP Version: 4.3.4 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2004-02-03 10:12:19] jaenecke@php.net 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

« previous php.doc (#969358709) next »