← All built-ins / feof()
feof()
feof(...$args): bool
Parameters
| Name | Type | Description |
|---|---|---|
| $handle | resource | handle from fopen() |
Return value
true after the end of file was reached.
Example
file_put_contents("/tmp/hphp_doc_feof.txt", "x");
$fh = fopen("/tmp/hphp_doc_feof.txt", "r");
fgets($fh);
var_dump(feof($fh));
fclose($fh);bool(true)