fgetc(3) php man page | unix.com

Man Page: fgetc

Operating Environment: php

Section: 3

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) - php
fread(3) - php
fgetc(3) - opendarwin
fgetss(3) - php
fgetc(3) - xfree86
Similar Topics in the Unix Linux Community
echo is too slow. HELP with Awk
function.fsockopen error
Replacing string
Inserting Stinr in between some where in file
Working with lines or variables that have spaces or special characters