Why I still use PHP

Tags: webdevelopment.
By lucb1e on 2012-09-05 21:32:46 +0100

Everbody seems to be against PHP nowadays. Well, not everyone, just the people with the loudest voices. In real life, I've never met anyone who disliked PHP. Online, there've been plenty.

So why is this? It's usually like this with something a minority finds bad. Cookies aren't really harmful, but people shouted enough until they got banned in the EU. Even before the ban, cleaning programs and even anti-virus makers (who you'd think know better) removed tracking cookies.

And yes, tracking cookies are slightly harmful for your privacy, but so is using the internet. You can be identified in numerous other ways, a cookie is more of an easy solution and a fail-safe.

Same with PHP, it's an easy solution and it always works. Sure, not always (and cookies can be blocked, so they're not 100% fail proof too), but enough that PHP has become very common. Why did it become so common though, more than most other languages?

  1. Because it just works.
    It does what I need it to do. If you dislike PHP, sit down before reading this, but I even use it a lot for scripts to be run from the command line.
  2. Because everybody uses it.
    Yeah this is a half-bad argument, I totally agree, but it is true. Why is Facebook so much better than all other competition? Mostly, because everybody is on it (and because it works well, for most people anyway), which brings me to the next point...
  3. Any self-respecting developer knows (or can at least read) the language.
    With a de facto standard, many people will know the language. You won't ever run out of people to maintain and extend the code.
  4. A lot is developed for it like libraries and frameworks.
  5. Security patches will be provided for a long time because of this popularity.
  6. Just about every webhost provides it, and provides it very cheaply.
  7. It is very easy to learn.
    I'm not saying it's the easiest language, but you can't deny it's an easy language.
  8. The docs are really great, and there is a lot to find with Google.

So in short, the language is popular because "it just works", it is easy to learn, and because it is popular. The more popular it becomes, the better the benefits get, which makes it even more popular.

Of course PHP is not for everything, but I think it is a really okay language for webdevelopment. And are there any bad sides? Absolutely. The incoherent way standard functions are named for example, the way OOP works, and lots of things I won't go into right now. Especially for small applications though, I think the benefits really outweigh the problems.
lucb1e.com
Another post tagged 'webdevelopment': Cookieless cookies

Look for more posts tagged webdevelopment.

Previous post - Next post