- var_dump: documentation ( source)
<?php
class Foo {
public static $staticProperty = 'foobar';
public $property = 'barfoo';
}
$reflectionClass = new ReflectionClass('Foo');
var_dump($reflectionClass->getProperty('staticProperty')->getValue());
var_dump($reflectionClass->getProperty('staticProperty')->getValue(new Foo));
var_dump($reflectionClass->getProperty('property')->getValue(new Foo));