PHP - spam cleanup

I inherited a very dirty project. It has at least 3 versions.

Is there a utility that can track PHP code from the main index.php so that I can understand what is not being used and what is, or am I stuck in a manual cleanup?

thank

* Update *

I don’t think it was clear to me what I was looking for, or I don’t understand how the products mentioned work. I am looking for something that can be run in a folder (directory) and run a project, and give me an account of which files are actually referenced or used (in the case of images, CSS, etc.).

There are several thousand files in this project, and this is a very small project. I try to clear it, and when I do a “file search” in my IDE, I get 3 or 4 links and cannot easily determine which one is correct.

Hope this gets a little clearer.

+3
source share
6 answers

Cross-linking software really lets you learn which features are used for what.

PHPXref is not bad.

For example, Yoast used it to cross-reference the Wordpress PHP code . Take a look at the Wordpress example of how powerful it is.

, WP. , , .. ..

+1

, , , Zend Studio, , , , .. , E_STRICT PHP .

+1

, PHP Javascript. , Java, , Eval(), , , , .

+1

, xdebug, , auto_append. , , , 100% ( , , ) , , , , , , , . : xdebug .

0

I would try to open the whole project in NetBeans PHP , this is a great tool that we use for huge projects. You can easily see warnings and notifications, and it is also easy to use functions / classes. Give it a try! I would recommend against automatic cleaning and the like. Even if the code seems to work later, I would not sleep very well at night ...

0
source

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


All Articles