STREAM_GET_LINE(3) 1 STREAM_GET_LINE(3)
stream_get_line - Gets line from stream resource up to a given delimiter
SYNOPSIS
string stream_get_line (resource $handle, int $length, [string $ending])
DESCRIPTION
Gets a line from the given handle.
Reading ends when $length bytes have been read, when the string specified by $ending is found (which is not included in the return value),
or on EOF (whichever comes first).
This function is nearly identical to fgets(3) except in that it allows end of line delimiters other than the standard
,
, and
,
and does not return the delimiter itself.
PARAMETERS
o $handle
- A valid file handle.
o $length
- The number of bytes to read from the handle.
o $ending
- An optional string delimiter.
RETURN VALUES
Returns a string of up to $length bytes read from the file pointed to by $handle.
If an error occurs, returns FALSE.
SEE ALSO
fread(3), fgets(3), fgetc(3).
PHP Documentation Group STREAM_GET_LINE(3)