How to get current function name - predefined variable?
| From: | David Yee | Date: | Thu, 11 Oct 2001 18:37:49 +0000 |
| Subject: | How to get current function name - predefined variable? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70839@lists.php.net to get a copy of this message | ||
Hi- is there a predefined variable that contains the current function name?
It would be useful in the following situation to quickly find out which
function caused the error:
function get_stats(){
...
$result = mysql_query($query) or die("Database error in function
$FUNC_NAME: " . mysql_error());
...
}
function get_stats2(){
{
...
$result = mysql_query($query) or die("Database error in function
$FUNC_NAME: " . mysql_error());
...
}
Thanks.
David