Finding unused PHP5 classes / methods in the code base

Possible duplicate:
How to find unused functions in a PHP project

How can I check unused code in PHP5? Something like the following?

  • Scan Classes with Reflection
  • Follow the “normal” code with token_get_all()and find the variables with the T_NEW token, and then look at the method calls.
  • Output something like classname (count of new declarations) methods (count of calls)
+3
source share

Source: https://habr.com/ru/post/1705521/


All Articles