(PHP 5 >= 5.1.0)
ReflectionClass::getStaticPropertyValue — Gets static property value
Gets the value of a static property on this class.
name
The name of the static property for which to return a value.
The value of the static property.
Przykład #1 Basic usage of ReflectionClass::getStaticPropertyValue()
<?php
class Apple {
public static $color = 'Red';
}
$class = new ReflectionClass('Apple');
var_dump($class->getStaticPropertyValue('color'));
?>
Powyższy przykład wyświetli:
string(3) "Red"