Function __global->explode
Definitions
sources_custom/phpstub.php
- Split a string by string.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $separator | string | No | No | required parameter | N/A | N/A | The separator |
| $string | string | No | No | required parameter | N/A | N/A | The string to split |
| $limit | ?integer | No | No | Null | N/A | N/A | The maximum number of splits (the last element containing the remainder) (null: no limit) |
Returns
- The split list
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Split a string by string.
*
* @param string $separator The separator
* @param string $string The string to split
* @param ?integer $limit The maximum number of splits (the last element containing the remainder) (null: no limit)
* @return array The split list
*/
function explode(string $separator, string $string, ?int $limit = null) : array
* Split a string by string.
*
* @param string $separator The separator
* @param string $string The string to split
* @param ?integer $limit The maximum number of splits (the last element containing the remainder) (null: no limit)
* @return array The split list
*/
function explode(string $separator, string $string, ?int $limit = null) : array

