Re: Retrieving variable name?

From: Date: Wed, 21 Sep 2005 22:00:12 +0000
Subject: Re: Retrieving variable name?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-222922@lists.php.net to get a copy of this message
> is it possible to retrieve the name of a variable passed into a > function from within the function? Sure. Use debug_backtrace to figure out what line and what file the caller is in, then read that file, find that line, find the function call within that line, and read what ever is between the parentheses. Can't think of why you'd want to do this, though...

« previous php.general (#222922) next »