SPHPlayground
sphplayground sphplayground

Reflection extensions

BASIC INFORMATION:

Some extensions for native PHP reflection [1]

Reflection Constant

ReflectionConstant implements native Reflector and tries to implement similar features with native reflection classes like ReflectionFunction etc.. It mimics native ReflectionConstant for systems running PHP version 8.3.

Synopsis
class ReflectionConstant implements Reflector
public readonly string $name
Constructor
public __construct(string $constantName)
public getValue():mixed
Returns the full name of the constant
public getName():string
Returns the name of the constant without namespaces
public getShortName():string
Returns the namespace name
public getNamespaceName():string
Checks if defined in a namespace
public inNamespace():bool
public getExtensionName():string|false
Returns the the extension which defined the member
public getExtension():?ReflectionExtension
public isInternal():bool
public isMagicConstant():bool
public isUserDefined():bool
public isDefined():bool
public __toString():string
public static isCompileTime(string $name):bool