PHP 8.6.0 Alpha 2 available for testing

La clase ReflectionConstant

(PHP 8 >= 8.4.0)

Introducción

La clase ReflectionConstant informa sobre los detalles de una constante global.

Sinopsis de la clase

class ReflectionConstant implements Reflector {
/* Propiedades */
public string $name;
/* Métodos */
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
}

Propiedades

name
Nombre de la constante. Solo lectura, lanza ReflectionException al intentar escribir.

Historial de cambios

Versión Descripción
8.5.0 La clase ya no es final.

Véase también

Tabla de contenidos

add a note

User Contributed Notes

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