src/Gobie/Regex/Wrappers/Pcre/PcreRegex.php
public static function split($pattern, $subject, $limit = -1, $flags = \PREG_SPLIT_DELIM_CAPTURE)
    {
        static::setUp($pattern);
        $res = \preg_split($pattern, $subject, $limit, $flags);
        static::tearDown();
        static::handleError($pattern);

        return $res;
    }
public static function split($pattern, $subject, $limit = -1, $flags = \PREG_SPLIT_DELIM_CAPTURE)
    {
        static::setUp($pattern);
        $res = \preg_split($pattern, $subject, $limit, $flags);
        static::tearDown();
        static::handleError($pattern);

        return $res;
    }
Regular expression split and return all parts.

@param string $pattern Pattern
@param string $subject Subject
@param int    $limit   Limit
@param int    $flags   Flags defaults to PREG_SPLIT_DELIM_CAPTURE
@return string[] Array of split parts, array with original string otherwise
@throws PcreRegexException When compilation or runtime error occurs
@link http://php.net/function.preg-split.php