ReflectionClass::getStaticProperties
ReflectionClass::getTraitAliases
ReflectionClass
PHP Manual

# ReflectionClass::getStaticPropertyValue

(PHP 5 >= 5.1.0)

ReflectionClass::getStaticPropertyValue — Gets static property value

### Descrição

public mixed ReflectionClass::getStaticPropertyValue ( string `$name` [, mixed `&$def_value` ] )

Gets the value of a static property on this class.

### Parâmetros

`name`

  The name of the static property for which to return a value.

`def_value`

### Valor Retornado

The value of the static property.

### Exemplos

Exemplo #1 Basic usage of ReflectionClass::getStaticPropertyValue()

`<?php
class Apple {
public static $color = 'Red';
}
$class = new ReflectionClass('Apple');
var_dump($class->getStaticPropertyValue('color'));
?>`

O exemplo acima irá imprimir:

    string(3) "Red"

### Veja Também

- ReflectionClass::getStaticProperties() - Gets static properties
- ReflectionClass::setStaticPropertyValue() - Sets static property value

ReflectionClass::getStaticProperties
ReflectionClass::getTraitAliases
ReflectionClass
PHP Manual