The dynamic nature of the PHP language (eval, using variables / functions through strings, etc.) makes it theoretically impossible to programmatically determine whether a function or variable is used in any situation.
Manual code analysis is, unfortunately, the best choice.
source
share