mb_stristr
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
Finds first occurrence of a string within another, case insensitive
Description
mb_stristr() finds the first occurrence of needle in haystack and returns the portion of haystack. Unlike mb_strstr(), mb_stristr() is case-insensitive. If needle is not found, it returns false.
Parameters
haystackThe string from which to get the first occurrence of
needleneedleThe string to find in
haystackbefore_needleDetermines which portion of
haystackthis function returns. If set to true, it returns all ofhaystackfrom the beginning to the first occurrence ofneedle(excluding needle). If set to false, it returns all ofhaystackfrom the first occurrence ofneedleto the end (including needle).encodingParameter
Return Values
Returns the portion of haystack, or false if needle is not found.
Changelog
| Version | Description |
|---|