src/Preg.php
public static function split($pattern, $subject, $limit = -1, $flags = 0)
    {
        $result = @preg_split(self::addUtf8Modifier($pattern), $subject, $limit, $flags);
        if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
            return $result;
        }

        $result = @preg_split(self::removeUtf8Modifier($pattern), $subject, $limit, $flags);
        if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
            return $result;
        }

        throw new PregException('Error occurred when calling preg_split.', preg_last_error());
    }
public static function split($pattern, $subject, $limit = -1, $flags = 0)
    {
        $result = @preg_split(self::addUtf8Modifier($pattern), $subject, $limit, $flags);
        if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
            return $result;
        }

        $result = @preg_split(self::removeUtf8Modifier($pattern), $subject, $limit, $flags);
        if (false !== $result && PREG_NO_ERROR === preg_last_error()) {
            return $result;
        }

        throw new PregException('Error occurred when calling preg_split.', preg_last_error());
    }
public static function split ( $ pattern , $ subject , $ limit = - 1 , $ flags = 0 ) { $ result = @ preg_split ( self :: addUtf8Modifier ( $ pattern ) , $ subject , $ limit , $ flags ) ; if ( false !== $ result && PREG_NO_ERROR === preg_last_error ( ) ) { return $ result ; } $ result = @ preg_split ( self :: removeUtf8Modifier ( $ pattern ) , $ subject , $ limit , $ flags ) ; if ( false !== $ result && PREG_NO_ERROR === preg_last_error ( ) ) { return $ result ; } throw new PregException ( 'Error occurred when calling preg_split.' , preg_last_error ( ) ) ; }
@param string $pattern
@param string $subject
@param int    $limit
@param int    $flags

@throws PregException

@return string[]
@param string $pattern @param string $subject @param int $limit @param int $flags