Static and non-static methods
| From: | Andrei Zmievski | Date: | Fri, 04 Apr 2003 14:52:37 +0000 |
| Subject: | Static and non-static methods | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-661@lists.php.net to get a copy of this message | ||
What does everyone think about disallowing non-instance calls to methods
which are not declared static? Currently, this works:
class A {
function B() { return 1; }
}
A::B();
But really, if B was intended to be used that way, it should have been
declared as static.
-Andrei http://www.gravitonic.com/
* If it ain't broken, it doesn't have enough features yet. *