The ReflectionConstant class

(PHP 8 >= 8.4.0)

Einführung

The ReflectionConstant class reports information about a global constant.

Klassenbeschreibung

class ReflectionConstant implements Reflector {
/* Eigenschaften */
public string $name;
/* Methoden */
public function __construct(string $name)
public function getExtensionName(): string|false
public function getFileName(): string|false
public function getName(): string
public function getNamespaceName(): string
public function getShortName(): string
public function getValue(): mixed
public function isDeprecated(): bool
public function __toString(): string
}

Eigenschaften

name
Name of the constant. Read-only, throws ReflectionException in attempt to write.

Changelog

Version Beschreibung
8.5.0 The class is no longer final.

Inhaltsverzeichnis