PHP can be easy, but it can be powerful, but either way, it is PHP

Dec 11, 2012 misc-web php
This post is more than 18 months old. Since technology changes too rapidly, this content may be out of date (but that's not always the case). Please remember to verify any technical or programming information with the current release.

There are two things that really grate on me as a PHP developer. First, people claiming that PHP is not powerful. And second, those who don’t actually work in the language, but have similar disciplines, trying to teach it. Let me elaborate.

PHP is easy to learn

PHP can be very easy to learn. That’s how it was designed! Something to do the simple tasks easily. However, that doesn’t mean that the whole entire language is easy. There are multiple levels and many facets. Unfortunately, since it is easy to get through the initial stages, many developers stick right there. I’m already making things that work, why would I need to get better? But it can get better.

Unfortunately, that attitude dilutes the programmer pool. Now we have a lot of novice PHP programmers calling themselves experts. The real fact is, they can solve a lot of problems. But, they haven’t solved enterprise level problems.

So that enters the newest dilemma: when faced with an enterprise level problem, what is a novice PHP programmer to do? They solve it, but the solution is quite horrible. They haven’t learned enough in depth to develop a good architecture. This solution, while it works, is very bug ridden and messy. Sadly, PHP then gets the bad name. In reality, it was the over confident programmer who over sold their skills either out of ignorance or arrogance.

PHP can be enterprise

There are many enterprise companies using PHP. If it was such a weak language, companies like Facebook and Yahoo wouldn’t use it as the tool of choice. Also, the term ’enterprise’ is something that is quite elusive. In my experience, true enterprise customers keep their technology choices close to their chest. Not a lot of enterprise PHP users? Maybe… maybe not.

If you’re going to teach PHP, KNOW PHP

I’ve seen a number of programmers who learned other languages add PHP as a notch on their belt. That’s fine, but don’t claim to be an expert unless you spend a lot of time in it. For example, I’ve seen JAVA programmers come into the OOP land of PHP and start using PHP like JAVA. You’re not speaking PHP right now. You wouldn’t “do it like that” in PHP. That’s not saying that you’d do it sloppy in PHP or more accurate, you’d just do it different. More often than not, the programmers I see that come into PHP get enthralled with that easy learning curve - and flexibility - and force the language to bend to their tenets from their previous language of choice, however inefficient that may be. Then, once again, PHP gets the bad wrap - but really it was the programming choices.

So, ending my rant…

I’ve always been in favor of giving people choices. That’s why I like Ubuntu vs a Mac. That’s why I like cars that I can work on vs the car with the compact engine. PHP provides that for me too. There are many ways for me to do something. And I’ve done it a lot of ways. After all that, I’ve learned. I never locked myself into one particular way. And once you’ve made all the mistakes - over a lifetime of programming so far - and learned from it, you can use PHP to it’s most powerful level and say its a great language and you’re an expert. Don’t claim this after you’ve just used it one way for your first time, because it was so easy to learn. And, before you bad mouth it, check out what real enterprise level programmers are doing with it.

Go to All Posts