In compiled languages such as C++ there are tools which point out or throw warnings when functions are not used or variables as well...but in PHP this is lsightly more difficult as functions like eval() or dynamic function invocation make simply following parse trees next to impossible...
Does PHP have some extensions which log parsed functions and match that against *callled* functions, same applies for variables (globals, members, etc).
feyd, you must know of something???