Re: Function for getting name of method being executed?

From: Date: Thu, 12 Mar 2015 04:35:48 +0000
Subject: Re: Function for getting name of method being executed?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-324631@lists.php.net to get a copy of this message
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

« previous php.general (#324631) next »