Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return part of a string
<?php substr(string $string, int $offset, ?int $length = null): string
<?php     private static function normalizeDatabaseUrlPath(string $urlPath): string

    {


        return substr($urlPath, 1);

    }
<?php     public function acceptNamedParameter(string $sql): void

    {

        $name = substr($sql, 1);



        if (! array_key_exists($name, $this->originalParameters)) {

            throw MissingNamedParameter::new($name);
<?php     {

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

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

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

        }



        return $identifier . $suffix;
<?php             $placeHolder = ':dcValue' . $this->boundCounter;

        }



        $this->setParameter(substr($placeHolder, 1), $value, $type);



        return $placeHolder;

    }
<?php             return dechex(crc32($column));

        }, $columnNames));



        return strtoupper(substr($prefix . '_' . $hash, 0, $maxSize));

    }

}
<?php         $pos = strpos($view['text'], ' AS ');



        if ($pos !== false) {

            $sql = substr($view['text'], $pos + 4);

        }



        return new View($view['name'], $sql);
<?php         $position = strrpos($name, '.');



        if ($position !== false) {

            $name = substr($name, $position + 1);

        }



        return strtolower($name);
<?php             return $class;

        }



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

    }

}
<?php     public static function conversionFailed($value, $toType, ?Throwable $previous = null)

    {

        $value = strlen($value) > 32 ? substr($value, 0, 20) . '...' : $value;



        return new self('Could not convert database value "' . $value . '" to Doctrine Type ' . $toType, 0, $previous);

    }
<?php     public static function conversionFailedFormat($value, $toType, $expectedFormat, ?Throwable $previous = null)

    {

        $value = strlen($value) > 32 ? substr($value, 0, 20) . '...' : $value;



        return new self(

            'Could not convert database value "' . $value . '" to Doctrine Type ' .
<?php         if (isset($value[0]) && ($value[0] === '+' || $value[0] === '-')) {

            $negative = $value[0] === '-';

            $value    = substr($value, 1);

        }



        try {
<?php             'comment' => 'expected+column+comment',

        ];



        $columnDefinition = substr(

            $this->connection->getDatabasePlatform()->getColumnDeclarationSQL('id', $options),

            strlen('id') + 1

        );



        $table = new Table('my_table');

        $table->addColumn('id', 'integer', [
<?php                 continue;

            }



            $parameters['driverOptions'][substr($param, strlen($prefix . 'driver_option_'))] = $value;

        }



        return $parameters;