The accurate way is to use the __FUNCTION__
predefined magic constant.
Example:
class Test {
function MethodA(){
echo __FUNCTION__;
}
}
Result: MethodA
.
More Related Contents:
- Laravel function name must be a string [closed]
- how to make a function that validates fields in a form? php [closed]
- PHP syntax for dereferencing function result
- PHP Fatal error: Using $this when not in object context
- Deprecated: mysql_connect() [duplicate]
- Giving my function access to outside variable
- How can I handle the warning of file_get_contents() function in PHP?
- What is the difference between a language construct and a “built-in” function in PHP?
- Are PHP functions case sensitive?
- How to get JavaScript function data into a PHP variable
- How would I skip optional arguments in a function call?
- Use a variable to define a PHP function
- Shorten long numbers to K/M/B?
- PHP function with variable as default value for a parameter
- Function list of php file
- PHP syntax for dereferencing function result
- Why are PHP function calls *so* expensive?
- PHP: $_GET and $_POST in functions?
- Jquery ajax setTimeout after form succes not redirecting?
- Undefined variable problem with PHP function
- Javascript and PHP functions
- strcmp equivelant for integers (intcmp) in PHP
- Cannot redeclare function php [duplicate]
- PHP get all arguments as array?
- Use php namespace inside function
- Calling a function within a Class method?
- Can a PHP function accept an unlimited number of parameters? [duplicate]
- PHP pass function name as param then call the function?
- Changing a global variable from inside a function PHP
- Use Variable as Function Name in PHP [duplicate]