← All built-ins / fgetc()
fgetc()
fgetc(...$args): string
Parameters
| Name | Type | Description |
|---|---|---|
| $handle | resource | handle from fopen() |
Return value
One character per call.
Example
file_put_contents("/tmp/hphp_doc_gc.txt", "ab");
$fh = fopen("/tmp/hphp_doc_gc.txt", "r");
echo fgetc($fh), fgetc($fh);
fclose($fh);ab