getting function name

From: Date: Fri, 15 Sep 2000 16:18:59 +0000
Subject: getting function name
Groups: php.general 
Request: Send a blank email to php-general+get-16945@lists.php.net to get a copy of this message
I'd like to have a function know the name of the function it was called from. Is this possible? Of course, I could get along with funcA() { funcB( 'funcA' ) ; } ; fucB( $caller ) { if ( 'funcA' == $caller ) ... } ; but would rather funcA() { funcB( 'funcA' ) ; } ; funcB() { if ( 'funcA' == func_get_caller() ) ... } ; or something like that. ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz ICQ: 2808 2505

« previous php.general (#16945) next »