Function __global->preg_split
Definitions
sources_custom/phpstub.php
- Split string by a regular expression.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $pattern | string | No | No | required parameter | N/A | N/A | The pattern |
| $subject | string | No | No | required parameter | N/A | N/A | The subject |
| $max_splits | integer | No | No | -1 | N/A | N/A | The maximum number of splits to make (-1: no limit) |
| $mode | ?integer | No | No | Null | N/A | N/A | The special mode (null: none) |
Returns
- The array due to splitting
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Split string by a regular expression.
*
* @param string $pattern The pattern
* @param string $subject The subject
* @param integer $max_splits The maximum number of splits to make (-1: no limit)
* @param ?integer $mode The special mode (null: none)
* @return array The array due to splitting
*/
function preg_split(string $pattern, string $subject, int $max_splits = -1, ?int $mode = null) : array
* Split string by a regular expression.
*
* @param string $pattern The pattern
* @param string $subject The subject
* @param integer $max_splits The maximum number of splits to make (-1: no limit)
* @param ?integer $mode The special mode (null: none)
* @return array The array due to splitting
*/
function preg_split(string $pattern, string $subject, int $max_splits = -1, ?int $mode = null) : array

