class Foo
{
public $abc;
function __construct() {
$this->abc = function(){
echo "new function";
};
}
function Bar()
{
echo "This is Bar";
}
}
$foo = new Foo();
$foo->Bar(); // echo "This is Bar"
How can I call the $abc variable function from the outside?
$foo->abc()doesn't work?