str::split

Better alternative for explode() It takes care of removing empty values and it has a built-in way to skip values which are too short.

str::split($string, $separator = ',', $length = 1)

Parameters

$string (string)
The string to split
$separator (string)
The string to split by
$length (int)
The min length of values.

Return values

array
An array of found values