php man page for fgetc

Query: fgetc

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FGETC(3)								 1								  FGETC(3)

fgetc - Gets character from file pointer

SYNOPSIS
string fgetc (resource $handle)
DESCRIPTION
Gets a character from the given file pointer.
PARAMETERS
o $handle -The file pointer must be valid, and must point to a file successfully opened by fopen(3) or fsockopen(3) (and not yet closed by fclose(3)).
RETURN VALUES
Returns a string containing a single character read from the file pointed to by $handle. Returns FALSE on EOF. Warning This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
EXAMPLES
Example #1 A fgetc(3) example <?php $fp = fopen('somefile.txt', 'r'); if (!$fp) { echo 'Could not open file somefile.txt'; } while (false !== ($char = fgetc($fp))) { echo "$char "; } ?>
NOTES
Note This function is binary-safe.
SEE ALSO
fread(3), fopen(3), popen(3), fsockopen(3), fgets(3). PHP Documentation Group FGETC(3)
Related Man Pages
fgets(3) - xfree86
fread(3) - php
fgetc(3) - opendarwin
getc(3) - php
fpassthru(3) - php
Similar Topics in the Unix Linux Community
function.fsockopen error
Adding a single char to a char pointer.
cat vs head vs readline get variable from txt file
fopen() - don't know what I'm doing wrong
Inserting Stinr in between some where in file