How to know the name of a function ?

How to know the name of a function ?

am 09.11.2008 22:41:05 von Jean-Philippe BATTU

Hello

In a function, what is the best way to know the name
of this function ?
I read the documentation and found only func_num_args(),
func_get_arg() and func_get_args which are relative to the
arguments given to the function.
What is the equivalent to $0 (bash) in php ?

Thanks for your help

Cheers

--
Jean-Philippe Battu




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

Re: How to know the name of a function ?

am 09.11.2008 22:45:56 von Stut

On 9 Nov 2008, at 21:41, Jean-Philippe Battu wrote:
> In a function, what is the best way to know the name
> of this function ?
> I read the documentation and found only func_num_args(),
> func_get_arg() and func_get_args which are relative to the
> arguments given to the function.
> What is the equivalent to $0 (bash) in php ?

The constant __FUNCTION__ will give you this.

-Stut

--
http://stut.net/

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