HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Output file size, truncate file, clear cache, and then output file size again
The clearstatcache() function clears the file status cache.
PHP caches data for some functions for better performance. If a file is to be checked several times in a script, you probably want to avoid caching to get correct results. To do this, use the clearstatcache() function.
Parameter | Description |
---|---|
clear_realpath_cache | Optional. Indicates whether to clear the realpath cache or not. Default is FALSE, which indicates not to clear realpath cache |
filename | Optional. Specifies a filename, and clears the realpath and cache for that file only |
Return Value: | Nothing |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3 - Added two optional parameters: clear_realpath_cahe and filename |
❮ PHP Filesystem Reference