Easy Tutorial
❮ Func Curl_Unescape Func Date Isodate Set ❯

PHP clearstatcache() Function



Definition and Usage

The clearstatcache() function clears the file status cache.

PHP caches the return information of certain functions to provide higher performance. However, in some cases, such as when checking the same file multiple times within a script where the file may be deleted or modified during the execution of the script, you need to clear the file status cache to get accurate results. To do this, use the clearstatcache() function.

Syntax


Tips and Notes

Tip: Functions that cache information, and are therefore affected by clearstatcache():


Example

The above code will output:


❮ Func Curl_Unescape Func Date Isodate Set ❯