ReflectionClass::getStaticPropertyValue
Gets static property value
Description
public mixed ReflectionClass::getStaticPropertyValue
( string $name
[, mixed &$def_value
] )
Parameters
-
name
-
The name of the static property for which to return a value.
-
def_value
-
Return Values
The value of the static property.
Examples
Example #1 Basic usage of ReflectionClass::getStaticPropertyValue
<?php
class Apple {
public static $color = 'Red';
}
$class = new ReflectionClass('Apple');
var_dump($class->getStaticPropertyValue('color'));
?>
The above example will output:
See Also
- ReflectionClass::getStaticProperties
- ReflectionClass::setStaticPropertyValue