← All docs

fread()

Binary-safe file read.

fread()

function fread(resource $stream, int $length): string

Binary-safe file read.

Parameters:

  • $stream (resource)
  • $length (int)

Returns: string

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

Internals

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