← All docs

mb_strrichr()

Returns text before or from the last case-insensitive substring match, or false.

mb_strrichr()

function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false

Returns text before or from the last case-insensitive substring match, or false.

Parameters:

  • $haystack (string)
  • $needle (string)
  • $before_needle (bool), default false, optional
  • $encoding (?string), default null, optional

Returns: string|false

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

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