The PHP framework can be a single entry, completely object-oriented, completely class-based MVC pattern. However, we are faced with a large amount of old code, or even new code, which is not necessarily fully compliant with object-oriented principles and design patterns. Small applications are fine. But if you face large-scale applications, it must be a big pain! !
What to do? Many people will always face this, and the PHP code needs to be refactored. (Of course, if you understand what I’m saying, you must have read the book “Refactoring—Improving the Design of Existing Code”)
Look at this link: http://zh-cn.w3support.net/index.php?db=so&id=100876 We can understand the pain of reconstruction! This is inevitable. But how can this pain be made lighter?
Refactoring tools are a must. Fortunately, there is now a refactoring tool for PHP - rephactor. It is indeed an excellent tool. (Of course, you must remember that there has never been a completely automated refactoring tool. Machines can never replace the human brain. The goal of all refactorings and every step still requires you to follow "Refactoring - Improving Existing Code". The book "Design" explains how to do it)
So: What does rephactor provide us?
Of course, it has some limitations and can only run on LINUX operating system, and only supports PHP5.2
Are you interested? With it, your refactoring will be greatly accelerated, and it is guaranteed that no new BUG will appear.
Official website: http://rephactor.sourceforge.net/
Why not install one and give it a try?