The Attribute class

(PHP 8)

简介

Attributes offer the ability to add structured, machine-readable metadata information on declarations in code: Classes, methods, functions, parameters, properties and class constants can be the target of an attribute. The metadata defined by attributes can then be inspected at runtime using the Reflection APIs. Attributes could therefore be thought of as a configuration language embedded directly into code.

类摘要

finalclassAttribute {
publicint$flags;
public__construct(int$flags = Attribute::TARGET_ALL)
}

属性

flags

目录

To Top