php8.5
Home/ Manual/ reference / reflection/ The ReflectionAttribute class

The ReflectionAttribute class

The ReflectionAttribute class provides information about an Attribute.

Intro

The ReflectionAttribute class provides information about an Attribute.

Class synopsis

class ReflectionAttribute implements Reflector { }

Properties

name

The name of the attribute.

Predefined Constants

ReflectionAttribute Flags

ReflectionAttribute::IS_INSTANCEOFint

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.

Changelog

VersionDescription
8.4.0All class constants are now typed.
8.4.0Added ReflectionAttribute::$name.

Reflectionattribute

In this section

Source: reference/reflection/reflectionattribute.xml · from the official PHP manual (php/doc-en)