← All docs

sscanf()

Parses a string according to a format.

sscanf()

function sscanf(string $string, string $format, ...$vars): array

Parses a string according to a format.

Parameters:

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

Returns: array

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

Internals

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