note 47007 added to function.file-exists

From: Date: Sat, 30 Oct 2004 11:20:23 +0000
Subject: note 47007 added to function.file-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-79349@lists.php.net to get a copy of this message
In response to flobee at gmx dot net : file_exists: "Note: The results of this function are cached. See clearstatcache() for more details." clearstatcache: "You should also note that PHP doesn't cache information about non-existent files. So, if you call file_exists() on a file that doesn't exist, it will return FALSE until you create the file. If you create the file, it will return TRUE even if you then delete the file." So if the file exists, your 500 cycles loop will only check whether the file exists one time. The other 499 cycles will just check an internal php cache. If the file doesn't exist, php will check it all of the 500 cycles. ---- Manual Page -- http://www.php.net/manual/en/function.file-exists.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47007 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47007&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47007&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79349) next »