PHP arsort() Function

Definition and Usage

The filesize() function returns the size of the specified file.

If successful, it returns the number of bytes of the file size. If it fails, it returns false and generates an E_WARNING level error.

Syntax

filesize(filename)
Parameter Description
filename Required. Specifies the file to be checked.

Tips and Comments

Tip:The result of this function will be cached. Please use clearstatcache() to clear the cache.

Example

<?php
echo filesize("test.txt");
?>

Output:

20