lordvader Posted March 19, 2008 Share Posted March 19, 2008 Instead of hardcoding the function's name, is there something that can deduce it? function some_function{ echo THIS_FUNCTION'S_NAME(); } And then executing that function displays some_function tia Link to comment https://forums.phpfreaks.com/topic/96844-is-there-a-way-to-retrieve-a-functions-name-while-inside-it/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 19, 2008 Share Posted March 19, 2008 Check the magic constant __FUNCTION__ http://www.php.net/manual/en/language.constants.predefined.php Link to comment https://forums.phpfreaks.com/topic/96844-is-there-a-way-to-retrieve-a-functions-name-while-inside-it/#findComment-495630 Share on other sites More sharing options...
lordvader Posted March 19, 2008 Author Share Posted March 19, 2008 YES!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THANKS PFMaBiSmAd Link to comment https://forums.phpfreaks.com/topic/96844-is-there-a-way-to-retrieve-a-functions-name-while-inside-it/#findComment-495651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.