PHP 4.0 Bug #9423: Please create a function that returns name of currently executing function
| From: | jide at lgb-inc dot com | Date: | Fri, 23 Feb 2001 15:54:26 +0000 |
| Subject: | PHP 4.0 Bug #9423: Please create a function that returns name of currently executing function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47347@lists.php.net to get a copy of this message | ||
From: jide@lgb-inc.com
Operating system:
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: Please create a function that returns name of currently executing function
Please consider adding a new feature to the next version of PHP.
When creating code that reports errors, it would be very helpful
to have a function which returns the name of the currently
executing function (or class method). You could perhaps
name the function "func_get_name()", which would fit in nicely
with the existing PHP functions "func_get_arg()", "func_get_args()",
and "func_num_args()". Example usage:
function foo() {
if ( some error condition ) {
ErrorHandler("An error occurrend in function " . func_get_name() );
}
}
If there is another (existing) way to accomplish this, please let me know.
Thank you for your consideration (and thanks for PHP) -
Jim Ide jide@lgb-inc.com
--
Edit Bug report at: http://bugs.php.net/?id=9423&edit=1