Re: Re: getting a function name of the calling function

From: Date: Thu, 02 May 2002 04:57:53 +0000
Subject: Re: Re: getting a function name of the calling function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95642@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 " . __FUNCTION__; > > echo "I am function ".get_func_name(); > > } > > ?> __FUNCTION__ will exist (exists) in PHP 4.3.0. This feature request can be seen here: http://bugs.php.net/bug.php?id=8576 http://bugs.php.net/bug.php?id=11393 http://cvs.php.net/co.php/php4/NEWS __CLASS__ will also come into being, to go along with their older siblings __LINE__ and __FILE__. These are special PHP core reserved/predefined constants. Regards, Philip Olson p.s. Controversy surrounds these magic constants, are they *really* constants? Inquiring minds want to know. :) http://www.php.net/constants

« previous php.general (#95642) next »