Question on functions finding out about caller

From: Date: Thu, 14 Mar 2002 03:13:13 +0000
Subject: Question on functions finding out about caller
Groups: php.general 
Request: Send a blank email to php-general+get-88417@lists.php.net to get a copy of this message
I've checked google and the PHP manual, with no results, so i thought i'd ask here: Is there any functionality in PHP to allow a function to find out what function/file/line called it? AFAIK, perl can do this, and i've always found it a big help when debugging to have functions die with a call to a standard error handler. (for example) function one() { if ($badstuff) death("I died for this reason"); } i know that calling death(__FILE__, __LINE__) will accomplish this, but i really don't want to do that. thanks in advance.

« previous php.general (#88417) next »