(PHP 8)
The ReflectionAttribute class provides information about an Attribute.
public getArguments(): array
public getName(): string
public getTarget(): int
public isRepeated(): bool
public newInstance(): object}
ReflectionAttribute::IS_INSTANCEOF int Retrieve attributes using an instanceof check.
Note:
The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.
| Version | Description |
|---|---|
| 8.4.0 | All class constants are now typed. |
| 8.4.0 | Added ReflectionAttribute::$name. |
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.reflectionattribute.php