← All docs

fscanf()

Parses input from a file according to a format.

fscanf()

function fscanf(resource $stream, string $format, ...$vars): array

Parses input from a file according to a format.

Parameters:

  • $stream (resource)
  • $format (string)
  • ...$vars — variadic: collects excess arguments into $vars.

Returns: array

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

Internals

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