Search Results
Parameters ¶ filter The optional filter, for filtering desired constant visibilities. It's configured using the ReflectionClassConstant constants, and defaults to all constant visibilities.
- getMethod
ReflectionClass::getMethod (PHP 5, PHP 7, PHP 8)...
- getProperties
Changelog ¶ ... Examples ¶ Example #1...
- getProperty
Gets a ReflectionProperty for a class's property Accessing...
- hasMethod
ReflectionClass::hasMethod (PHP 5 >= 5.1.2, PHP 7, PHP 8)...
- isSubclassOf
See Also ¶ ReflectionClass::isInterface () - Checks if the...
- getShortName
ReflectionClass::getShortName (PHP 5 >= 5.3.0, PHP 7, PHP...
- getDocComment
Note that \ReflectionClass::getDocComment() ignores all...
- getMethods
Note, for ReflectionClass::getMethods() not all methods in a...
- getMethod
Aug 15, 2025 · ReflectionClass::getConstants () is a method that allows developers to retrieve all the constants defined within a specific class as an associative array. This function is part of PHP's Reflection API, which provides a way to reverse-engineer classes, interfaces, functions, methods, and extensions.
Nov 30, 2019 · The ReflectionClass::getConstants () function is an inbuilt function in PHP which is used to return an array of the specified constant names. Syntax: array ReflectionClass::getConstants( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an array of the specified constant names. Below programs illustrate the ReflectionClass::getConstants ...
Feb 27, 2012 · PHP: Get class constants from static method using ReflectionClass Asked 14 years, 1 month ago Modified 14 years, 1 month ago Viewed 2k times
Dec 15, 2023 · ReflectionClass::newInstanceWithoutConstructor — Creates a new class instance without invoking the constructor ReflectionClass::setStaticPropertyValue — Sets static property value ReflectionClass::__toString — Returns the string representation of the ReflectionClass object
Simple usage example of `ReflectionClass::getConstants ()`. The PHP function `ReflectionClass::getConstants ()` returns an associative array containing all the constants defined in a class.
Reflection::getModifierNames — Gets modifier names ReflectionClass ReflectionClass::__construct — Constructs a ReflectionClass ReflectionClass::export — Exports a class ReflectionClass::getConstant — Gets defined constant ReflectionClass::getConstants — Gets constants ReflectionClass::getConstructor — Gets the constructor of the class
