Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the position of the last occurrence of a substring in a string
strrpos(string $haystack, string $needle, int $offset = 0): int|false
{
$header = $this->header('Authorization', '');
$position = strrpos($header, 'Bearer ');
if ($position !== false) {
$header = substr($header, $position + 7);
$header = $this->header('Authorization', '');
$position = strrpos($header, 'Bearer ');
if ($position !== false) {
$header = substr($header, $position + 7);
return $subject;
}
$position = strrpos($subject, (string) $search);
if ($position === false) {
return $subject;
}
$position = strrpos($subject, (string) $search);
if ($position === false) {
return $subject;
return $subject;
}
$position = strrpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
$position = strrpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
public function getUnqualifiedForeignTableName()
{
$name = $this->_foreignTableName->getName();
$position = strrpos($name, '.');
if ($position !== false) {
$name = substr($name, $position + 1);
{
$name = $this->_foreignTableName->getName();
$position = strrpos($name, '.');
if ($position !== false) {
$name = substr($name, $position + 1);
return $class;
}
$pos = strrpos($class, '\\' . Proxy::MARKER . '\\');
if ($pos === false) {
return $class;
}
$pos = strrpos($class, '\\' . Proxy::MARKER . '\\');
if ($pos === false) {
return $class;
$staticPrefix = self::getStaticPrefix($glob, $flags);
if (false !== ($pos = strrpos($staticPrefix, '/'))) {
if (0 === $pos) {
if (false !== ($pos = strrpos($staticPrefix, '/'))) {
if (0 === $pos) {
public static function makeTempDir($namespace, $className)
{
if (false !== ($pos = strrpos($className, '\\'))) {
$shortClass = substr($className, $pos + 1);
} else {
$shortClass = $className;
{
if (false !== ($pos = strrpos($className, '\\'))) {
$shortClass = substr($className, $pos + 1);
} else {
$shortClass = $className;
}
if (isset($this->doublesSeparators[$regexFirstChar])) {
$regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);
} else {
$regexEndPos = \strrpos($regex, $regexFirstChar);
}
if (isset($this->doublesSeparators[$regexFirstChar])) {
$regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);
} else {
$regexEndPos = \strrpos($regex, $regexFirstChar);
}
if (isset($this->doublesSeparators[$regexFirstChar])) {
$regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);
} else {
$regexEndPos = \strrpos($regex, $regexFirstChar);
}
if ($regexEndPos === false) {
$regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);
} else {
$regexEndPos = \strrpos($regex, $regexFirstChar);
}
if ($regexEndPos === false) {
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
}
if (false !== $pos = strrpos($class, '\\')) {
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
if (false !== $pos = strrpos($class, '\\')) {
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
$rejectedClasses = array();
$realSubPath = substr($filePath, strlen($basePath) + 1);
$dotPosition = strrpos($realSubPath, '.');
$realSubPath = substr($realSubPath, 0, $dotPosition === false ? PHP_INT_MAX : $dotPosition);
foreach ($classes as $class) {
$realSubPath = substr($filePath, strlen($basePath) + 1);
$dotPosition = strrpos($realSubPath, '.');
$realSubPath = substr($realSubPath, 0, $dotPosition === false ? PHP_INT_MAX : $dotPosition);
foreach ($classes as $class) {
}
if ('psr-0' === $namespaceType) {
$namespaceLength = strrpos($class, '\\');
if (false !== $namespaceLength) {
$namespace = substr($class, 0, $namespaceLength + 1);
$className = substr($class, $namespaceLength + 1);
if ('psr-0' === $namespaceType) {
$namespaceLength = strrpos($class, '\\');
if (false !== $namespaceLength) {
$namespace = substr($class, 0, $namespaceLength + 1);
$className = substr($class, $namespaceLength + 1);
}
try {
$filename = substr($target, 0, strrpos($target, $format) - 1);
if (isset(static::$compressFormats[$format])) {
try {
$filename = substr($target, 0, strrpos($target, $format) - 1);
if (isset(static::$compressFormats[$format])) {
$class = trim($class, '\\');
$path = $classLoader->findFile($class);
$code = file_get_contents($path);
$separatorPos = strrpos($class, '\\');
$className = $class;
if ($separatorPos) {
$className = substr($class, $separatorPos + 1);
$path = $classLoader->findFile($class);
$code = file_get_contents($path);
$separatorPos = strrpos($class, '\\');
$className = $class;
if ($separatorPos) {
$className = substr($class, $separatorPos + 1);