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
feof(3) - php
fgetss(3) - php
fgetc(3) - php
ftell(3) - php
fgets(3) - opendarwin
Similar Topics in the Unix Linux Community
Adding a single char to a char pointer.
extracting value in variable??
cat vs head vs readline get variable from txt file
Inserting Stinr in between some where in file
Working with lines or variables that have spaces or special characters