RE: [PHP] getting a function name of the calling function

From: Date: Wed, 01 May 2002 20:18:40 +0000
Subject: RE: [PHP] getting a function name of the calling function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95590@lists.php.net to get a copy of this message
> Does anybody know of any constants or predefined functions that will > retrieve the calling functions name? For example: > > <? > function new_func($somedata) { > echo "I am function ".get_func_name(); > } > ?> I don't believe there is anything setup to pass the name of a parent function to a child function. However you could always pass the parent function's name to the child function as a normal parameter. Sincerely, Craig Vincent

« previous php.general (#95590) next »