- var_dump: documentation ( source)
<?php
class Foo
{
private $bar = 'baz';
}
class Qwe extends Foo
{
public function qwerty()
{
$reader = function & ($object, $property) {
$value = & Closure::bind(function & () use ($property) {
return $this->$property;
}, $object, $object)->__invoke();
return $value;
};
return $bar = & $reader($this, 'bar');
}
}
$q = new Qwe();
var_dump($q->qwerty());