strrchr

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the last occurrence of a character in a string
strrchr(string $haystackstring $needle): string|false
    private function dataForSometimesIteration(string $attribute$removeLastSegmentOfAttribute)

    {

        
$lastSegmentOfAttribute strrchr($attribute'.');



        
$attribute $lastSegmentOfAttribute && $removeLastSegmentOfAttribute

                    
Str::replaceLast($lastSegmentOfAttribute''$attribute)
        $reflect = new \ReflectionClass($this);

        
$namespace $reflect->getNamespaceName();



        return 
substr(strrchr($namespace"\\"), 1);

    }

}
                        $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k;

                    }

                } elseif (
$debugClass !== $class && === strpos($k$class)) {

                    
$prefixedKeys[$i] = "\0".$debugClass.strrchr($k"\0");

                }

                ++
$i;

            }
                        if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) {

                            
$signature .= '?';

                        }

                        
$signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' ';

                    }

                }

                
$signature .= $k;
                $signature .= ' = ';



                if (
$param->isDefaultValueConstant()) {

                    
$signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1);

                } elseif (
null === $v) {

                    
$signature .= 'null';

                } elseif (
\is_array($v)) {
                } elseif (\is_bool($v)) {

                    
$signature .= $v 'true' 'false';

                } elseif (
\is_object($v)) {

                    
$signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1);

                } else {

                    
$signature .= $v;

                }
        $signature = (empty($a[$prefix.'returnsReference']) ? '' '&').'('.substr($signature2).')';



        if (isset(
$a[$prefix.'returnType'])) {

            
$signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1);

        }



        return 
$signature;