Posted by Rami Elomaa on 05/08/07 09:02
"gizz" <gizz@nospam.org> wrote in message
news:46403b9b$0$792$426a34cc@news.free.fr...
> Hi,
>
> I'd like to get the name of the calling method. I can't find the solution.
> For example :
>
> function MyFct()
> {
> return TheOtherFct() ;
> }
>
> function TheOtherFct()
> {
print_r(debug_backtrace()); // It's in there somewhere
> echo "Hi, the calling method is ..." ;
> return true ;
> }
>
> MyFct() ;
see http://fi2.php.net/debug_backtrace for documentation
--
Rami.Elomaa@gmail.com
"Good tea. Nice house." -- Worf
Navigation:
[Reply to this message]
|