Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks an assertion
<?php assert(mixed $assertion, Throwable|string|null $description = null): bool
<?php         $query    = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression());

        $database = $this->fetchOne($query);



        assert(is_string($database) || $database === null);



        return $database;

    }
<?php         $version = $this->getDatabasePlatformVersion();



        if ($version !== null) {

            assert($this->_driver instanceof VersionAwarePlatformDriver);



            return $this->_driver->createDatabasePlatformForVersion($version);

        }
<?php     {

        $this->connect();



        assert($this->_conn !== null);



        return $this->_conn;

    }
<?php     public function getServerVersion()

    {

        $serverInfo = db2_server_info($this->conn);

        assert($serverInfo instanceof stdClass);



        return $serverInfo->DBMS_VER;

    }
<?php     public function beginTransaction()

    {

        $result = db2_autocommit($this->conn, DB2_AUTOCOMMIT_OFF);

        assert(is_bool($result));



        return $result;

    }
<?php         }



        $result = db2_autocommit($this->conn, DB2_AUTOCOMMIT_ON);

        assert(is_bool($result));



        return $result;

    }
<?php         }



        $result = db2_autocommit($this->conn, DB2_AUTOCOMMIT_ON);

        assert(is_bool($result));



        return $result;

    }
<?php     public function bindValue($param, $value, $type = ParameterType::STRING)

    {

        assert(is_int($param));



        return $this->bindParam($param, $value, $type);

    }
<?php     public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)

    {

        assert(is_int($param));



        switch ($type) {

            case ParameterType::INTEGER:
<?php         iterable $postInitializers = []

    ) {

        $connection = mysqli_init();

        assert($connection !== false);



        foreach ($preInitializers as $initializer) {

            $initializer->initialize($connection);
<?php         $this->hasColumns = true;



        $fields = $meta->fetch_fields();

        assert(is_array($fields));



        $this->columnNames = array_map(static function (stdClass $field): string {

            return $field->name;
<?php     public function bindParam($param, &$variable, $type = ParameterType::STRING, $length = null)

    {

        assert(is_int($param));



        if (! isset(self::$_paramTypeMap[$type])) {

            throw UnknownParameterType::new($type);
<?php     public function bindValue($param, $value, $type = ParameterType::STRING)

    {

        assert(is_int($param));



        if (! isset(self::$_paramTypeMap[$type])) {

            throw UnknownParameterType::new($type);
<?php         $types   = $this->types;



        foreach ($this->_bindedValues as $parameter => $value) {

            assert(is_int($parameter));



            if (! isset($types[$parameter - 1])) {

                $types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
<?php             throw Error::new($this->dbh);

        }



        assert(preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches) === 1);



        return $matches[1];

    }