Re: Fw: Identify which function called another

From: Date: Thu, 13 Jan 2005 03:50:47 +0000
Subject: Re: Fw: Identify which function called another
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206270@lists.php.net to get a copy of this message
Lars B. Jensen wrote:
Is there any way, I from one function can identify which other function called it, without parameter passing the name manually ?
Please don't post twice in an hour if you haven't yet received your answer. With that in mind, I have an answer for you. :-) Use debug_backtrace(): http://www.php.net/debug-backtrace Harry Fuecks has an excellent post on how to use debug_backtrace() here: http://www.sitepoint.com/blog-post-view.php?id=157007 -- Ben Ramsey Zend Certified Engineer http://benramsey.com

« previous php.general (#206270) next »