← All docs

strrpos()

Finds the numeric position of the last occurrence of a substring.

strrpos()

function strrpos(string $haystack, string $needle, int $offset = 0): mixed

Finds the numeric position of the last occurrence of a substring.

Parameters:

  • $haystack (string)
  • $needle (string)
  • $offset (int), default 0, optional

Returns: mixed

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

Internals

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