src/Connection.php
public static function create(
        string $dsn,
        string $username = null,
        string $passwd = null,
        array $options = null
    ): self {
        $defaultOptions = [
            \PDO::ATTR_STRINGIFY_FETCHES => false
        ];

        try {
            return new static(new \PDO($dsn, $username, $passwd, array_replace($defaultOptions, $options ?? [])));
        } catch (\Throwable $exception) {
            throw static::wrapException($exception);
        }
    }
public static function create(
        string $dsn,
        string $username = null,
        string $passwd = null,
        array $options = null
    ): self {
        $defaultOptions = [
            \PDO::ATTR_STRINGIFY_FETCHES => false
        ];

        try {
            return new static(new \PDO($dsn, $username, $passwd, array_replace($defaultOptions, $options ?? [])));
        } catch (\Throwable $exception) {
            throw static::wrapException($exception);
        }
    }
public static function create ( string $ dsn , string $ username = null , string $ passwd = null , array $ options = null ) : self { $ defaultOptions = [ \ PDO :: ATTR_STRINGIFY_FETCHES => false ] ; try { return new static ( new \ PDO ( $ dsn , $ username , $ passwd , array_replace ( $ defaultOptions , $ options ?? [ ] ) ) ) ; } catch ( \ Throwable $ exception ) { throw static :: wrapException ( $ exception ) ; } }
Creates a self instance. All the arguments are the arguments for the PDO constructor.

@param string $dsn
@param string|null $username
@param string|null $passwd
@param array|null $options
@return static
@throws PDOException
@see http://php.net/manual/en/pdo.construct.php Arguments reference
Creates a self instance . All the arguments are the arguments for the PDO constructor .