March 2009
4 posts
Static Method?
Sounds like this function should be static if you’re wanting to call it this way.
Whatever::function();
marco:
Can PHP do this?
(new Whatever())->function();
It gives me a parse error and makes me do this instead:
$w = new Whatever(); $w->function();
But you can do this perfectly well:
$w->function()->otherFunction();
One hack is to define a function with the same name...