How to Get Name of Calling Function/Method in PHP

Sometimes I need to know where a function is called from. Especially when a function is called a lot by other functions.

This piece of one liner will help you to determine where the function was called from.

You can echo it as well.


Leave a reply:

Your email address will not be published.