Chapter 2. Anti-Patterns

Here's where we start on anti-patterns; before you get your hopes up thinking I'm about to tell you something amazing that will wonderfully streamline your code without using design patterns, I won't be doing that here (did I mention I'm great at crushing hopes and dreams?). Anti-patterns are, in short, things you don't want in your code.

Speaking of crushing hopes and dreams, should you ever have a junior developer, anti-patterns are also a great way of teaching methodologies that should be equally avoided. Learning anti-patterns also can boost the effectiveness of code reviews; instead of debating code quality on the basis of personal opinions, you can have an external source to consult on code quality.

Anti-patterns constitute ...

Get Mastering PHP Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.