Page 1 of 1

[SOLVED] Show where a function lives?

Posted: Tue Jun 07, 2005 2:09 pm
by infolock
Ok, I have thousands of files and classes I deal with so I've run into a problem. I need to find out where a variable lives or is defined from. like, where $var was originally defined at (which class, filename, or function). Anyone have any clues?

Posted: Tue Jun 07, 2005 2:13 pm
by hawleyjr

Code: Select all

__FUNCTION__
__CLASS__
__FILE__
Edit:
http://us3.php.net/manual/en/language.c ... efined.php

Posted: Tue Jun 07, 2005 2:20 pm
by infolock
that only works if it's called from the current file... i found the answer via debug_print_backtrace()