Re: Function for getting name of method being executed?
| From: | Robert Williams | Date: | Thu, 12 Mar 2015 01:21:48 +0000 |
| Subject: | Re: Function for getting name of method being executed? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324630@lists.php.net to get a copy of this message | ||
On Mar 11, 2015, at 18:10, Jeffry Killen <jekillen@prodigy.net<mailto:jekillen@prodigy.net>> wrote:
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)
You might be interested in the __FUNCTION__ and __METHOD__ magic constants. For more details, see:
<http://php.net/manual/en/language.constants.predefined.php>
--
Bob Williams
Business Unit Information Officer and
Senior Vice President of Software Development
Newtek Business Services Corp.
http://www.thesba.com/
________________________________
Notice: This communication, including attachments, may contain information that is confidential. It
constitutes non-public information intended to be conveyed only to the designated recipient(s). If
the reader or recipient of this communication is not the intended recipient, an employee or agent of
the intended recipient who is responsible for delivering it to the intended recipient, or if you
believe that you have received this communication in error, please notify the sender immediately by
return e-mail and promptly delete this e-mail, including attachments without reading or saving them
in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail,
including attachments, is prohibited and may be unlawful. If you have received this email in error,
please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if
any).