Re: Coding standards
| From: | Markus Fischer | Date: | Tue, 17 Jul 2001 03:19:00 +0000 |
| Subject: | Re: Coding standards | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-836@lists.php.net to get a copy of this message | ||
On Mon, Jul 16, 2001 at 10:44:17PM -0400, Jon Parise wrote :
> 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.
Uhm, of course. +1
Just wanted to make sure its known that its currently possible :p
- Markus
--
Markus Fischer, http://guru.josefine.at/~mfischer/
EMail: mfischer@guru.josefine.at
PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0