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
fgets(3) - php
fwrite(3) - php
ftell(3) - php
ungetc(3) - opendarwin
Similar Topics in the Unix Linux Community
echo is too slow. HELP with Awk
function.fsockopen error
Replacing string
extracting value in variable??
Inserting Stinr in between some where in file