Re: Coding standards
| From: | Jon Parise | Date: | Tue, 17 Jul 2001 02:44:17 +0000 |
| Subject: | Re: Coding standards | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-835@lists.php.net to get a copy of this message | ||
On Tue, Jul 17, 2001 at 03:41:18AM +0200, Markus Fischer wrote:
> > > Well, to a certain degree there is. You just need to stay away from
> > > $this, or at least test if $this === null if you want the method to be
> > > "statically callable".
> >
> > Actually, you can't rely on that - if you call a static method from within
> > another object, then $this will be the $this of that other object.
>
> You can use 'get_class()' on '$this' and figure it out that way.
Wow, that would be two kludges in a row! <g>
I'd really prefer if static methods were implemented at the
language level if things will come to that.
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member