PHP function stream_get_line()

Availability in PHP 5.0

Gets line from stream resource up to a given delimiter

Parameters

Parameter Data type Default value Note
$handle resource not A valid file handle.
$length int not The number of bytes to read from the handle.
$ending string null An optional string delimiter.

Return values

string

a string of up to length bytes read from the file pointed to by handle.

If an error occurs, returns false.

Other resources

Official stream-get-line documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.