Given a multibyte string, return an array of its characters (original) (raw)

mb_str_split

(PHP 7 >= 7.4.0)

mb_str_split — Given a multibyte string, return an array of its characters

Description

mb_str_split ( string $string [, int $split_length = 1 [, string $encoding = mb_internal_encoding() ]] ) : array

Parameters

string

The string to split into characters or chunks.

split_length

If specified, each element of the returned array will be composed of multiple characters instead of a single character.

encoding

The encodingparameter is the character encoding. If it is omitted, the internal character encoding value will be used.

A string specifying one of the supported encodings.

Return Values

mb_str_split() returns an array of strings, or FALSE on failure.