略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Attribute

2025-02-27

The Attribute attribute

(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.

类摘要

final class Attribute {
/* 常量 */
/* 属性 */
public int $flags;
/* 方法 */
public __construct(int $flags = Attribute::TARGET_ALL)
}

属性

flags

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/class.attribute.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3