Skip to main content

Posts

Showing posts with the label anti-patterns

What are the PHP-specific antipatterns that you know of?

PHP as a Blunt Instrument I hear PHP getting bashed around a lot lately. In quite a few projects, I have seen insane php code bases - so bad you really wonder if the person was on hallucinogenic drugs when they wrote the code. Sometimes, I wonder what the code would have been like if the initial developers had a bit more guidance as to what not to do. However, I have also seen some very well organized PHP projects that were done in 100% OOP and were a pleasure to maintain, but they were not written by "php programmers." I give all of our junior devs a link to Java Anti-Patterns . One of the nice things about that page is the Java-specific examples because there are many features of Java that lend themselves to common mistakes. I was hoping to find a similar list for php, but a google search did not reveal anything meaningful. There are a few questions already out there for what a developer should know when programming PHP , but I wanted to focus on the negative.