mb_substr_count()
function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int
Counts non-overlapping occurrences of an encoded substring.
Parameters:
$haystack(string)$needle(string)$encoding(?string), defaultnull, optional
Returns: int
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_substr_count.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_substr_count is implemented in the compiler, see the internals page.