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.
Parameters
Name | Type | Default | Description |
---|---|---|---|
$string * | string |array |null |
– | The string to split |
$separator | string |
',' |
The string to split by |
$length | int |
1 |
The min length of values. |
Return type
array