From time to time, I'm handed bloated, undocumented, buggy PHP code to fix. I have several tools I use to fix such code as quickly as possible.
One thing I'm not sure how to do that occasionally causes me grief is finding where a function is located (in which file it is defined). Note that I don't want to know where a function is called from.
For example I'd like to be able to do this:
//file1.php
function foo(){
echo 'bar';
}
.
//file2.php
where_is_function('foo');//error
include('file1.php');
echo where_is_function('foo');//outputs'file1.php'