← All docs
mb_split()
Splits a string using a multibyte regex and an optional maximum number of fields.
mb_split()
function mb_split(string $pattern, string $string, int $limit = -1): array|false
Splits a string using a multibyte regex and an optional maximum number of fields.
Parameters:
$pattern(string)$string(string)$limit(int), default-1, optional
Returns: array|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_split.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_split is implemented in the compiler, see the internals page.