class foo{
var $c = 10;
}
class a{
var $b = null;
function a() {
$this->b = new foo();
}
}
$a = new a();
echo $a->b->c;