Many businesses and organizations depend on older high-value PHP software that risks abandonment because it is impossible to maintain. The reasons for this may be that the software is not well designed; there is only one developer (the one who created the system) who can develop it because he didn’t use common design patterns and documentation; or the code is procedural, not object-oriented. With this book, you’ll learn to identify problem code and refactor it to create more effective applications using test-driven design.
At first I wanted to read Martin Fowler's Refactoring but the examples in the book were in Java which I'm not familiar with. Thus I try searching for a book written in a language that I use daily and at last I found this book.
So glad I discovered this because I'm very much enlightened after reading this book!
This book describes many refactoring techniques from Refactoring: Improving the Design of Existing Code (2nd Edition). The second edition has examples wrote in JavaScript. The "Refactoring: Improving the Design of Existing Code" describes also code smells.