ReflectionAttribute::getName

(PHP 8)

ReflectionAttribute::getName — Gets the name of the attribute

Description

public function ReflectionAttribute::getName(): string

Gets the name of the attribute.

The name is resolved when the attribute is declared, using the imports and namespace in effect at that point. The returned name is the fully qualified class name of the attribute, without a leading backslash. The attribute class does not need to exist for the name to be returned.

Parameters

This function has no parameters.

Return Values

The name of the attribute.