Say I have a static object:
class everything{
public static function must(){
return "go!";
}
}
When I do this:
echo everything::must();
I get the answer:
go!
What is the expected behavior.
Now, for my own reasons (legacy code support), I would like to be able to call this static object from the return of a function call in syntax like this:
print accessorFunction()::must();
function accessorFunction(){
returns (reference to)everything;
}
I hope I have a fairly clear-cut question.
Thanks.
source
share