← All built-ins / filesize()
filesize()
filesize(string $s): int
Parameters
| Name | Type | Description |
|---|---|---|
| $path | string | file path |
Return value
File size in bytes.
Example
file_put_contents("/tmp/hphp_doc_s.txt", "12345");
echo filesize("/tmp/hphp_doc_s.txt");
unlink("/tmp/hphp_doc_s.txt");5