Ack
Its like grep, but better, faster, and does more what you want to generally do with large source collections. Written in Perl, and does complete PCRE because of this. Recursive traversal is default, and it intelligently skips files that are unlikely to match using file-type identification to short cut.
( This means it automatically avoids traversing .svn/.hg/.git
directories and thus gives massive speedups )
ack "function\s+foo\s*\(" --php
# find the definition of "foo" in all php files
# decendant of the current directory