Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is string
<?php is_string(mixed $value): bool
<?php         $query    = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression());

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



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



        return $database;

    }
<?php         return $this->executeStatement(

            'DELETE FROM ' . $table . ' WHERE ' . implode(' AND ', $conditions),

            $values,

            is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types

        );

    }
<?php         $this->addCriteriaCondition($criteria, $columns, $values, $conditions);



        if (is_string(key($types))) {

            $types = $this->extractTypeValues($columns, $types);

        }
<?php             'INSERT INTO ' . $table . ' (' . implode(', ', $columns) . ')' .

            ' VALUES (' . implode(', ', $set) . ')',

            $values,

            is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types

        );

    }
<?php     private function getBindingInfo($value, $type)

    {

        if (is_string($type)) {

            $type = Type::getType($type);

        }
<?php     private function needsArrayParameterConversion(array $params, array $types): bool

    {

        if (is_string(key($params))) {

            return true;

        }
<?php         $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $params['url']);

        assert(is_string($url));



        $url = parse_url($url);
<?php         }



        foreach ($url as $param => $value) {

            if (! is_string($value)) {

                continue;

            }
<?php             $table = $table->getQuotedName($this);

        }



        if (! is_string($table)) {

            throw new InvalidArgumentException(

                __METHOD__ . '() expects $table parameter to be string or ' . Table::class . '.'

            );
<?php     {

        if ($index instanceof Index) {

            $index = $index->getQuotedName($this);

        } elseif (! is_string($index)) {

            throw new InvalidArgumentException(

                __METHOD__ . '() expects $index parameter to be string or ' . Index::class . '.'

            );
<?php     {

        $constraints = [];

        foreach ($definition as $column => $def) {

            if (is_string($def)) {

                $constraints[] = 'CHECK (' . $def . ')';

            } else {

                if (isset($def['min'])) {
<?php     {

        if ($index instanceof Index) {

            $indexName = $index->getQuotedName($this);

        } elseif (is_string($index)) {

            $indexName = $index;

        } else {

            throw new InvalidArgumentException(
<?php         if ($table instanceof Table) {

            $table = $table->getQuotedName($this);

        } elseif (! is_string($table)) {

            throw new InvalidArgumentException(

                __METHOD__ . '() expects $table parameter to be string or ' . Table::class . '.'

            );
<?php     {

        if ($table instanceof Table) {

            $table = $table->getQuotedName($this);

        } elseif (! is_string($table)) {

            throw new InvalidArgumentException(

                __METHOD__ . '() expects $table parameter to be string or ' . Table::class . '.'

            );
<?php             return $callback((bool) $value);

        }



        if (! is_string($value)) {

            return $callback(true);

        }