ID: 34421 Comment by: thomas at gielfeldt dot dk Reported By: wkonkel at gmail dot com Status: Open Bug Type: Feature/Change Request Operating System: redhat PHP Version: 5.0.5 New Comment:
Hi I've mailed the patch to the internals mailing list, hoping it would be taken into consideration. two new functions have been added: get_scope() and is_static(). Example of solution to the above code after patching: <? class baseClass { static function do_get_scope() { return get_scope(); } static function do_backtrace() { $backtrace = debug_backtrace(); return $backtrace[0]['scope']; } } class extendedBaseClass extends baseClass { } echo extendedBaseClass::do_get_scope() . "<br>"; echo extendedBaseClass::do_backtrace() . "<br>"; ?> Expected result: ---------------- extendedBaseClass extendedBaseClass Actual result: -------------- extendedBaseClass extendedBaseClass Previous Comments: ------------------------------------------------------------------------ [2005-12-21 11:26:11] thomas at gielfeldt dot dk Hi I have a solution for the above problem. A patch that adds "scope" to the debug_backtrace return array, and also 2 new functions: get_scope() and is_static(). How do i submit this patch to the php-team? Thanks /Thomas ------------------------------------------------------------------------ [2005-09-14 16:47:33] civilization_2 at hotmail dot com > Or cook a patch by yourself. hehe, I'm thinking about it. ------------------------------------------------------------------------ [2005-09-14 15:45:34] [EMAIL PROTECTED] > Guess we'll just have to wait. Or cook a patch by yourself. ------------------------------------------------------------------------ [2005-09-14 15:41:02] civilization_2 at hotmail dot com If the engine just switches context rather than actually inheriting methods, then this seems conceptually flawed to me. If this is an engine problem, it will probably require a massive rewriting, resulting in ... PHP6 :-) Guess we'll just have to wait. ------------------------------------------------------------------------ [2005-09-13 20:07:46] wkonkel at gmail dot com I don't understand why this keeps being dismissed as bogus. It's an outstanding issue that should be fixed regardless of the current limitations of the way the engine works. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34421 -- Edit this bug report at http://bugs.php.net/?id=34421&edit=1