ID: 47454
Updated by: [email protected]
Reported By: wesley dot gunn at email dot it
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: irrelevant
PHP Version: 5.3.0beta1
Previous Comments:
------------------------------------------------------------------------
[2009-02-20 01:13:55] wesley dot gunn at email dot it
i'm sorry... resolved!
debug_backtrace();
i'm sorry!!!
thank you anyway!
------------------------------------------------------------------------
[2009-02-19 22:28:22] wesley dot gunn at email dot it
Description:
------------
hello,
i'm building a test/debug framework for my apps
i think can be useful a function that provides the caller scope of a
certain function/method
thank you
Reproduce code:
---------------
namespace;
echo get_caller_scope(); // returns "\" global scope
namespace Test\A;
echo get_caller_scope(); // returns Test\A
class CallerTest
{
public static function gimme(){echo get_caller_scope();}
public static function launch(){self::test();}
}
Test::gimme(); // returns Test\A
Test::launch(); // returns Test\A\CallerTest
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47454&edit=1