- var_dump: documentation ( source)
<?php
class Foo { private $x = 3; }
$foo = new Foo;
$foobar = function () { var_dump($this->bar); };
// without the last parameter (optional, defaults to false), we'd get a static, not unbound closure
$foobar = $foobar->bindTo(null, 'FooBar', true);
$foobar->call($foo); // prints int(3)