← All docs
mb_stristr()
Returns text before or from the first case-insensitive substring match, or false.
mb_stristr()
function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding = null): string|false
Returns text before or from the first case-insensitive substring match, or false.
Parameters:
$haystack(string)$needle(string)$before_needle(bool), defaultfalse, optional$encoding(?string), defaultnull, optional
Returns: string|false
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/mb_stristr.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_stristr is implemented in the compiler, see the internals page.