Be aware that if needle is an empty string, mb_stristr return the haystack by default.For exemple:<?phpif (mb_stristr("foo", "")) { echo "We enter in condition";}?>Because in the above exemple the return of mb_stristr is "foo".So if we do not want this kind of behaviour, we must set the third argument, ($before_needle) to true.<?phpif (mb_stristr("foo", "", true)) { echo "We do not enter in condition";}?>It can be useful to know it, specially when needle is dynamic.