- var_dump: documentation ( source)
<?php
class A {
private $_b;
function __construc($b) {
$this->_b = $b;
}
function __get($name)
{
echo "get $name \n";
return $this->{'_' . $name};
}
function __isset($name)
{
echo "isset $name\n";
return true;
}
}
class B {
private $_c;
function __construc($c) {
$this->_c = $c;
}
function __get($name)
{
echo "get $name \n";
return $this->{'_' . $name};
}
function __isset($name)
{
echo "isset $name\n";
return true;
}
}
$c = new B('plop');
$b = new B($c);
$a = new A($b);
var_dump(isset($a->b->c));