← All docs

sprintf()

Returns a formatted string.

sprintf()

function sprintf(string $format, ...$values): string

Returns a formatted string.

Parameters:

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

Returns: string

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

Internals

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