|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-28 04:15 UTC] sander@php.net
[2002-04-10 18:08 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
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