- var_dump: documentation ( source)
<?php
class A {
public $a = 'public';
protected $_b = 'protected';
private $_c = 'private';
}
$method = function (){ $x =& $this; $x = new stdClass; var_dump($this, $this->a, $x);};
$a = new A;
$method = $method->bindTo($a);
$method();