Re: Static and non-static methods
| From: | Derick Rethans | Date: | Sat, 05 Apr 2003 07:34:32 +0000 |
| Subject: | Re: Static and non-static methods | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-711@lists.php.net to get a copy of this message | ||
On Sat, 5 Apr 2003, Sebastian Bergmann wrote:
> Rasmus Lerdorf wrote:
> > Along the same lines, why do you care if you can call a static method
> > in a class without declaring it static?
>
> A warning would be nice. After all declaring a static method
> explicitly static using the appropriate keyword improves performance (a
> bit) because $this doesn't have to be initialized etc.
I'd go for a notice instead, just like the other things like using an
uninitialized variable.
Derick
--
"my other box is your windows PC"
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
-------------------------------------------------------------------------