Introduction
PHP Manual
PHP Manual»Réflexion»ReflectionConstant

La classe ReflectionConstant

(PHP 8 >= 8.4.0)

La classe ReflectionConstant apporte des informations sur une constante globale.

class ReflectionConstant implements Reflector {
/* Propriétés */
public string $name;
/* Méthodes */
public function __construct(string $name)
public function getAttributes(?string $name = null, int $flags = 0): array
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
}
name
Le nom de la constante. En lecture seule, lance une ReflectionException en cas d'essai d'écriture.
Version Description
8.5.0 La classe n’est plus finale.

Sommaire

To Top