Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get string length
<?php strlen(string $string): int
<?php     public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey)

    {

        $sql = '';

        if (strlen($foreignKey->getName()) > 0) {

            $sql .= 'CONSTRAINT ' . $foreignKey->getQuotedName($this) . ' ';

        }
<?php             throw new InvalidArgumentException("Incomplete definition. 'foreign' required.");

        }



        if (strlen($foreignKey->getForeignTableName()) === 0) {

            throw new InvalidArgumentException("Incomplete definition. 'foreignTable' required.");

        }
<?php     private function addSuffix(string $identifier, string $suffix): string

    {

        $maxPossibleLengthWithoutSuffix = $this->getMaxIdentifierLength() - strlen($suffix);

        if (strlen($identifier) > $maxPossibleLengthWithoutSuffix) {

            $identifier = substr($identifier, 0, $maxPossibleLengthWithoutSuffix);

        }
<?php     private function addSuffix(string $identifier, string $suffix): string

    {

        $maxPossibleLengthWithoutSuffix = $this->getMaxIdentifierLength() - strlen($suffix);

        if (strlen($identifier) > $maxPossibleLengthWithoutSuffix) {

            $identifier = substr($identifier, 0, $maxPossibleLengthWithoutSuffix);

        }
<?php         foreach ($diff->removedIndexes as $index) {

            $indexName = strtolower($index->getName());

            if (strlen($indexName) === 0 || ! isset($indexes[$indexName])) {

                continue;

            }
<?php         foreach (array_merge($diff->changedIndexes, $diff->addedIndexes, $diff->renamedIndexes) as $index) {

            $indexName = strtolower($index->getName());

            if (strlen($indexName) > 0) {

                $indexes[$indexName] = $index;

            } else {

                $indexes[] = $index;
<?php             }



            $constraintName = strtolower($constraint->getName());

            if (strlen($constraintName) === 0 || ! isset($foreignKeys[$constraintName])) {

                continue;

            }
<?php         foreach (array_merge($diff->changedForeignKeys, $diff->addedForeignKeys) as $constraint) {

            $constraintName = strtolower($constraint->getName());

            if (strlen($constraintName) > 0) {

                $foreignKeys[$constraintName] = $constraint;

            } else {

                $foreignKeys[] = $constraint;
<?php         $dbType = strtolower($tableColumn['type']);

        if (

            strlen($tableColumn['domain_type']) > 0

            && ! $this->_platform->hasDoctrineTypeMappingFor($tableColumn['type'])

        ) {

            $dbType                       = strtolower($tableColumn['domain_type']);
<?php     protected function _addUniqueConstraint(UniqueConstraint $constraint): Table

    {

        $mergedNames = array_merge([$this->getName()], $constraint->getColumns());

        $name        = strlen($constraint->getName()) > 0

            ? $constraint->getName()

            : $this->_generateIdentifierName($mergedNames, 'fk', $this->_getMaxIdentifierLength());
<?php     {

        $constraint->setLocalTable($this);



        if (strlen($constraint->getName()) > 0) {

            $name = $constraint->getName();

        } else {

            $name = $this->_generateIdentifierName(
<?php     public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint)

    {

        if (strlen($fkConstraint->getName()) === 0) {

            throw SchemaException::namedForeignKeyRequired($localTable, $fkConstraint);

        }
<?php                 $handler($matches[0]);

                reset($patterns);



                $offset += strlen($matches[0]);

            } else {

                next($patterns);

            }
<?php             }

        }



        assert($offset === strlen($sql));

    }



    private function getMySQLStringLiteralPattern(string $delimiter): string
<?php             return $class;

        }



        return substr($class, $pos + strlen(Proxy::MARKER) + 2);

    }

}