[PHP] PERL Caller equivalent function

2006-03-20 Thread sgsweb

Hi,

Perl has a function named caller with the following signature and return 
values:


   ($package, $filename, $line, $subroutine,
$hasargs, $wantarray, $evaltext, $is_require) = caller($i);

This function returns information pertaining to the calling routine, 
such as the name of the function and package that called this function.  
Is there such a function for PHP?


Please let me know.

thanks,
sgs.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PERL Caller equivalent function

2006-03-20 Thread Chris

sgsweb wrote:

Hi,

Perl has a function named caller with the following signature and return 
values:


   ($package, $filename, $line, $subroutine,
$hasargs, $wantarray, $evaltext, $is_require) = caller($i);

This function returns information pertaining to the calling routine, 
such as the name of the function and package that called this function.  
Is there such a function for PHP?


debug_backtrace returns an array of how the function got called (ie the 
complete path that was taken from the start to get to this function).


http://www.php.net/debug_backtrace

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php