← All docs

stream_get_line()

Gets line from stream resource up to a given delimiter.

stream_get_line()

function stream_get_line(resource $stream, int $length, string $ending = ''): string

Gets line from stream resource up to a given delimiter.

Parameters:

  • $stream (resource)
  • $length (int)
  • $ending (string), default '', optional

Returns: string

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how stream_get_line is implemented in the compiler, see the internals page.