Re: Detect calling function with debug_backtrace()

From: Date: Thu, 16 Mar 2006 13:17:52 +0000
Subject: Re: Detect calling function with debug_backtrace()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-232026@lists.php.net to get a copy of this message
Mathijs wrote:
Hello, i want to use debug_backtrace() in the function called by register_shutdown_function but it only displays the function we are currently in (the shutdown function) Is there any way to trace what class, methode or line caused php to call the shutdown function ??
the engine calls the shutdown function(s) - so the stack will be empty apart from the function currently being called. this happens _after_ your script finishes (regardless of how it finishes) - I don't think there is a way to know on what file/line your script exited.
Thx in advanced


« previous php.general (#232026) next »