Re: Get class name in static method
| From: | Rafael | Date: | Tue, 21 Mar 2006 11:10:18 +0000 |
| Subject: | Re: Get class name in static method | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232306@lists.php.net to get a copy of this message | ||
Yeap, that's the method we're using in PHP4, but when we tried to change to PHP5 we found out that the behaviour of debug_backtrace() had changed, and it's (was?) not even documented (well done, don't you think) And we haven't found any issue with this solution (...in PHP4)
http://bugs.php.net/bug.php?id=34421
There's also a bug report, and even a patch submited, but the devolopers haven't said anything else about this bug/feature in the bug thread, it seems it isn't a priority for them, and this was something that it really made angry at the time (and I'm still not too happy with this problem and they're position of passive-won't-fix) I guess to vote is the only thing we can do, but don't expect it to have an impact though.
Grant Young wrote:
Not sure about PHP5, but for PHP4 I found this hack solution at: http://passivedigressive.com/archives/2005-02/php-static-class-name-solution/ There are probably all sorts of issues with this approach, but it solved the problem at the time... -- Atentamente, J. Rafael Salazar Magaña Innox - Innovación Inteligente Tel: +52 (33) 3615 5348 ext. 205 / 01 800 2-SOFTWARE http://www.innox.com.mx