- var_dump: documentation ( source)
<?php
class Foo
{
private $foo =2;
}
class Proxy extends Foo
{
public function getFoo() {
$getter = function(){return $this->foo;};
return \Closure::bind($getter, $this, 'Foo');
}
}
$hydrated = new Proxy();
$getter = $hydrated->getFoo();
var_dump($getter());