For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > August 2005 > Geting current function name









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Geting current function name
alex

2005-08-27, 6:55 pm

Hi,

I'd like to get the name of the class & method I'm using.
For example :
class myclass{
function myfunction()
{
echo "class name : " . get_class($this) ;
echo "method name : " . ?????? ;
}
}

How can I get it ?
Many thanks in advance,

--
Alex


ZeldorBlat

2005-08-27, 6:55 pm

You want the magic constant __FUNCTION__

More info here:

http://www.php.net/manual/en/langua....predefined.php

alex

2005-08-28, 6:55 pm

"ZeldorBlat" <zeldorblat@gmail.com> a écrit dans le message de news:
1125167015.995352.101390@f14g2000cwb.googlegroups.com...
> You want the magic constant __FUNCTION__
>
> More info here:
>
> http://www.php.net/manual/en/langua....predefined.php
>


thanks :-)


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com