Home / PHP / OOP / Can you get a method name from within a method in PHP?

Can you get a method name from within a method in PHP?


echo "hello from class name: ".__CLASS__." and method:".__METHOD__.""." and with param : ".$param;

__CLASS__ retrieves class name and __METHOD__ retrieves method name within the Class

Hits: 7

Leave a Reply