[dev] Fwd: Re: [PHP-DEV] New exceptions mechanism

Jan Schneider jan at horde.org
Tue Feb 3 23:59:05 PST 2004


But it only exists since 4.3.0.

Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Seems like this (__CLASS__) ought to be quite useful to us somewhere.
>
> ----- Forwarded message from stig at php.net -----
>    Date: Tue, 03 Feb 2004 23:27:02 +0100
>    From: "Stig S. Bakken" <stig at php.net>
> Reply-To: "Stig S. Bakken" <stig at php.net>
> Subject: Re: [PHP-DEV] New exceptions mechanism
>      To: Adam Bregenzer <adam at bregenzer.net>
>
> 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
>
> ----- End forwarded message -----
>
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> "Here, I brought some cole slaw. It's made from peeeooople! Just kidding."
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org



Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list