Can you do this in PHP? I've heard conflicting opinions:
Something like:
Class bar {
function a_function () { echo "hi!"; }
}
Class foo {
public $bar;
function __construct() {
$this->bar = new bar();
}
}
$x = new foo();
$x->bar->a_function();
Will this echo "hi!" or not?