[php] How to get name of calling function/method in PHP?

The simplest way is:

echo debug_backtrace()[1]['function'];