Re: Any chance of having __invokeStatic()
| From: | Nikita Popov | Date: | Mon, 28 Nov 2011 20:11:28 +0000 |
| Subject: | Re: Any chance of having __invokeStatic() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56658@lists.php.net to get a copy of this message | ||
How would this be different from defining a function MyClass?
Nikita
On Mon, Nov 28, 2011 at 9:02 PM, Dmitri Snytkine
<dsnytkine@ultralogistics.com> wrote:
> I think __invokeStatic() would be a very useful magic function, especially
> with support for late static binding.
> you could difine it one and all sub-classes will have that option of
> basically being callable classes.
>
> MyClass($params) could then do some processing and return some data.
>
> This would basically be the same as doing MyClass::doSomething($params);
> only without the extra typing of ::doSomething