Re: Function for getting name of method being executed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mar 11, 2015, at 6:15 PM, Robert Cummings wrote:

On 15-03-11 09:10 PM, Jeffry Killen wrote:
Hello;

I have begun to use get_class($this) in __construct method
to establish a way to construct custom error messages to be
returned from member methods.

Is there a similar function to get the name of the method in which
the error might occur? (to save having to hard code it in every
place where it might be necessary)

Thanks for time and attention;
JK


See __CLASS__ and __METHOD__.

http://php.net/manual/en/language.constants.predefined.php

Cheers,
Rob.

Thanks for the reference. It looks just like what I am looking for

Thanks to Bob Williams as well.

JK


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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux