src/Crate/PDO/PDO.php
private static function parseDSN($dsn)
    {
        $matches = [];

        if (!preg_match(static::DSN_REGEX, $dsn, $matches)) {
            throw new PDOException(sprintf('Invalid DSN %s', $dsn));
        }

        return array_slice($matches, 1);
    }
private static function parseDSN($dsn)
    {
        $matches = [];

        if (!preg_match(static::DSN_REGEX, $dsn, $matches)) {
            throw new PDOException(sprintf('Invalid DSN %s', $dsn));
        }

        return array_slice($matches, 1);
    }
private static function parseDSN ( $ dsn ) { $ matches = [ ] ; if ( ! preg_match ( static :: DSN_REGEX , $ dsn , $ matches ) ) { throw new PDOException ( sprintf ( 'Invalid DSN %s' , $ dsn ) ) ; } return array_slice ( $ matches , 1 ) ; }
Extract servers and optional custom schema from DSN string

@param string $dsn The DSN string

@throws \Crate\PDO\Exception\PDOException on an invalid DSN string

@return array An array of ['host:post,host:port,...', 'schema']
Extract servers and optional custom schema from DSN string