PHP gets the current class name, function Name, method name
__FUNCTION__ function name (New in PHP 4.3.0). Since PHP 5 this constant returns the name of the function as it was defined (case sensitive). In PHP 4 this value is always lowercase.
__CLASS__ The name of the class (new in PHP 4.3.0). Since PHP 5 this constant returns the name of the class when it was defined (case sensitive). In PHP 4 this value is always lowercase.
__METHOD__ The method name of the class (newly added in PHP 5.0.0). Returns the name of the method as it was defined (case-sensitive).
Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.
The above introduces how PHP obtains the current class name, function name, and method name, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.