- var_dump: documentation ( source)
<?php
class x
{
public function __construct()
{
$self = &$this;
$func = function () use (&$self) {
$self->test();
};
$func();
}
private function test(){ echo 'test';}
}
var_dump(new x);