PHP 8.5.2 Released!

ReflectionConstant クラス

(PHP 8 >= 8.4.0)

はじめに

ReflectionConstant クラスは、グローバル定数に関する情報を報告します。

クラス概要

class ReflectionConstant implements Reflector {
/* プロパティ */
public string $name;
/* メソッド */
public __construct(string $name)
public getName(): string
public getValue(): mixed
public isDeprecated(): bool
public __toString(): string
}

プロパティ

name
定数の名前。読み取り専用です。 書き込もうとすると ReflectionException がスローされます。

変更履歴

バージョン 説明
8.5.0 このクラスは、final ではなくなりました。

目次

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top