PHP: The Myths, The Maths & The Musts

by Najmus Saqib  June 16, 2014

There’s a popular saying about programming languages from Bjarne Stroustrup, the creator of C++.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

I think the most targeted language in this regard is PHP. If I had a penny for every time someone bashed PHP, I would have been a millionaire by now. (Yup, that’s one more way of becoming a millionaire in silicon valley 🙂 ) The reality is that PHP may have a few drawbacks, but still it is the first language of choice for web development.

PHP is around now for a couple of decades and it has yet to face any real threat from any other web development language. In a field where people switch IDEs, frameworks and tools so frequently, this fact makes PHP really awesome.

The Myths

Myth 1: Luck

Most non PHP developers consider it as an accidental empire. However, the reality is much different. In all fairness, PHP has certain qualities which makes it a first choice for developers. Following are three truths that give PHP the position it has in the development world:

  • PHP has a very small learning curve.
  • PHP focuses on getting the job done.
  • PHP gives superb ease to framework developers which results in a variety of quality frameworks. Checkout the features in these Yii framework  and Laravel. Only a subset of these features are the USPs of many new languages.

Myth 2: Performance

PHP is slow as it parses the files each time a web request is handled. Script caching has been a part of PHP for many years. (Check PHP APC and PHP OPCache). PHP indeed runs a separate process for each request which makes it marginally slow, but this prevents memory leaks. This is a great benefit of PHP over Java and .Net based web apps.

Myth 3: Competition

New languages are constantly offering great new features and PHP is left behind. This is certainly not true. The last three versions of PHP—5.4, 5.5, and 5.6—are feature-rich which makes PHP even more robust now.

Closures, built-in development server, namespaces and many more exciting features are there. You name it and PHP has it. 🙂

The Maths

As they say numbers don’t lie and in the case of PHP, numbers are its most strong argument. Number of PHP developers, number of sites built using PHP, and number of open source projects based on PHP all indicate one thing: PHP remains to be awesome.

When it comes to server side, PHP still leads with no competition in side. Popular websites, like Facebook, QQ, Flipkart, and many more, trust PHP for its server side requirement. It is also worth noting that WordPress, the CMS which powers the 20% of websites, is built on PHP.

The Musts

Like everything in this world, there is a right way of doing things and there is a wrong way. Same is the case for PHP. Here are some must to-dos if you are using PHP for your web deployment:

  • Use frameworks instead of creating core PHP apps.
  • Always use the latest version of PHP.
  • Don’t be afraid to use experimental versions of PHP like PHP NG. They are as stable as any of the recently evolved web development language.
  • Keep updating your PHP knowledge, so that you can use latest PHP features effectively.

I think slinging mud at PHP is a childish thing. Every language has its ups and downs. However, PHP has shown that it is going strong even after 20 years. Do you agree with or not? Tell me your opinion on this in the comments sections given below.

Create PHP websites without the worry of server management.

Deploy your PHP app on optimized PHP hosting servers.

About Najmus Saqib

Najmus Saqib is currently working as Senior Software Engineer at Cloudways. He specializes in PHP, Python, and Google App Engine.

Stay Connected:

You Might Also Like...

  • RIGHT THINGS ARE LISTED HERE. BECAUSE I FACED SOME OF QUESTIONS LIKE THESE IN MY CAREER STARTING. I HAVE THINK EACH OF THIS AND FINALLY I LOVE PHP. IT IS SO EASY TO WRITE AND EXPLORE YOUR KNOWLEDGE WITH LITTLE EFFECT MOSTLY IT IS OPEN SOURCE. IF YOU FACE ANY PROBLEM LOT OF PEOPLE ARE READY TO SHARE KNOWLEDGE WITH YOU. THIS ARTICLE IS INTERESTING.

    • GingerTechie

      LOUD NOISES!

      With that, you will be taken more seriously if you’re not typing with caps lock on. People will perceive that you’re yelling, not commenting.

      • Hi GinderTechie, Thanks for suggestion I have updated my Case in comment.

  • Walther Bernhard

    While i mostly have to agree, a few points:

    * “PHP has a very small learning curve”. -> Leading to people coding “critical” applications with no idea what they are doing. Trust me, did it myself 😉
    * About the Memory leaks, other languages got that fixed aswell without needing to spawn multiple threads and slow everything down. This is just cheap implementation and for sure no benefit. See Go or NodeJS.
    * “PHP remains to be awesome.” -> is clearly just an opinion i see no context for saying this here.
    * “Always use the latest version of PHP.” -> In a professional environment this is mostly simply not possible.

  • diegoangel77

    I saw ” Leading to people coding “critical” applications with no idea what they are doing” in java and .net too. It is not. There ara most PHp programmers walking aournd than jva or .net, maybe, but not all of they are porfessionals working for serious projects

  • mindpower

    Numbers don’t lie. But that means Justin Bieber is the *best musician in the world* because he is the *most popular amongst teenage girls*. LOL.

    PHP is bloody awful and you have to be clueless or inexperienced to rush to its defence.

  • Good post

  • Atanas Markov

    Well, you say right things and rubbish. “Use frameworks instead of creating core PHP apps.”. What do you mean? Use CHtml::escape instead of built in htmlspecialchars? Use events in non events language? Use ORM instead of learning simple sql? For small apps frameworks help. For large business solutions or jeavy sites they break all and make a week work to need even a year with all fixes, bunches of classes, bundles, dependencies. The overhead may kill any server with non static content to show and large data plus tens or hundreds of requests.

    Learn basic programming principles, then PHP. After that frameworks are tools and you may either use or not use them depending on project. Small= easy tool, large= use your knowledge and make it optimal. Easy maintainance is good, but not the holy grail. After all a product has to work at first place. And a site to kill server is not something working so sometimes you just have to use the language itself.