I just fell in need of knowing the name of the method that is currently being called. After having a few minutes of unsuccessful searching i just thought of Late Static Binding and here the PHP Manual helped me.

Just do this inside your method;

echo __CLASS__; // For Class Name
echo __METHOD__; // For Method Name

Good Luck Developers.

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">