str_split()
function str_split(string $string, int $length = 1): array
Converts a string into an array of chunks of the given length.
Parameters:
$string(string)$length(int), default1, optional
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/str_split.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how str_split is implemented in the compiler, see the internals page.