On Tue, 2004-02-03 at 22:47, Adam Bregenzer wrote: > On Tue, 2004-02-03 at 12:12, Ferdinand Beyer wrote: > > If you try to access $this in staticMethod() it will certainly be the > > same as $obj. > > I apologize if this is OT or just generally inappropriate for the > internal list, but I had a question in the general list that is related > to this. I was wondering if it was possible to retrieve the class name > (i.e. class_name($this)) from within a static method. In php4 > var_dump($this) in a static method returns NULL. Has this changed in > php5, and if so what class name will it return when the static method is > called from an extended class? > > Here is my post for reference: > http://marc.theaimsgroup.com/?l=php-general&m=107575408628272&w=2 > > If there is another way to achieve what I am looking for I would be very > appreciative if someone could point me in the right direction.
Try __CLASS__. - Stig -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php