Re: Retrieving variable name?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux