Let’s start by accepting that PHP has never been a perfect language, and it still isn’t, but the gap has been reducing constantly and the pace of this shift is quite evident from the fact that even with all its flaws, PHP does perfectly fine for a majority of the projects. In fact, I believe that no language out there can fit all the cases and therefore the focus should be more on choosing a competent team instead.

A competent team working on a decent language is any day better than an average team working with the perfect tools and languages.

Still not convinced? Have read a lot of bad things about PHP on the web? I’ll try to sort these things out for you today. And hopefully, by the end of this read, you’ll be in a better position to decide that if PHP is a good choice for you and your next million dollar project :).

1. It’s getting faster with every release.

“It’s slow” is possibly the first argument anyone would make against PHP; however, it has always been fast enough for building websites and web applications. Unless we were to build a scientific algorithm and programs in which every extra millisecond saved matters, PHP has served well.

On top of that, it’s getting faster with every new release. PHP7 was almost 50% faster than PHP5, a significant improvement by any given standards. PHP7.3 further improved the performance by about 15%. The performance has more than doubled in the last five to six years. PHP7 allows the system to execute twice as many requests per second compared to PHP5.6, at almost half of the latency.

PHP getting faster with every release
Need more? PHP8 is coming with support for the JIT compiler. That’s massive. It might not have an enormous impact on the web app performance, but this definitely opens up new doors for PHP outside the web. You can read more about it here if you are interested.

2. Composer leveled the playing field.

Every successful language has had a stable and globally accepted package & dependency manager for decades. Although a bit late to the clan, but with the development of Composer, PHP has joined the list and has been a game-changer since then. Composer has become the cornerstone of modern PHP development.

If you talk to someone from the pre-composer era, you can feel the pain in their voice while they talk about how difficult it was to manage project dependencies and make use of the open-source packages & libraries, however, post-composer era has given a much-needed boom to the open-source community by making it much easier for them to share their work.

In fact, right now, the global repository for composer packages hosts 289,720+ packages (source: packagist.org). And, there’s a very high chance of finding a ready to use package here for the functionalities you need in your projects, directly translating to lower cost and faster development for the Project owners.

3. PSR Standards brought the community together.

Developers of varied experience, skills and preference levels have used PHP for all kinds of projects for decades. Before PSR (PHP Standard Recommendations), every company, and every developer had their own set of standards for adherence and differed in PHP implementations. Thus, having a common set of standards, we all could agree on, was a blessing! (Source: https://www.php-fig.org/psr/) PHP’s strength lies in the community and their open-source contributions, and that was made easier by PSR standards and composer. For the project owner, this meant
  1. Better quality projects.
  2. Uniformity – Multiple development partners could work together on a single project and still have a consistent codebase.

4. Laravel for the win

For every 10 web frameworks written in node, Ruby, Python etc. there are at least 20 to counter them in PHP. Trust us when we say – there is no shortage of good code in PHP.
Symphony, Yii, CakePHP, CodeIgniter, Zend etc – all of these have been great PHP frameworks and have served the web development projects for a very long time but the arrival of Laravel framework has taken the development scene by storm.
Popular PHP frameworks
It has become the most widely used framework and has covered up for shortcomings of PHP to a great extent. It has definitely provided something extraordinary to the developers. A big thanks to Taylor Otwell for bringing together the best of all available frameworks and create a beautiful modern framework!! Not only among PHP, but Laravel has become one of the most popular frameworks out there across all languages for web development. Once you start using it, there is no going back. It’s secure, fast, modular, clean and everything else anyone could ask for.
Different frameworks usage

5. PHP is no more that immature kid it used to be.

It’s original author “Rasmus Lerdorf” never intended to create a full-fledged language. He intended to create something basic that would enable him to make dynamic web pages. You see – PHP started on the wrong foot. However, it’s not the same language anymore. With the release of PHP7, it stands head to head with any other language out there. Exceptions, Classes, Interfaces, Closures, Namespaces, Traits – you name any modern feature that a first-class language should have; PHP has it. However, people still carry the same image in their head that PHP had with version PHP5.2 and bad mouth it. They need to move on because PHP definitely has.

6. Great Community Support

PHP powers more than 75% of the web. From small blogging platforms to great sophisticated CMS systems – PHP does it all. Over 6 million developers actively use PHP. Due to this vast ecosystem, there is a great chance that when you search for “How to In PHP” type questions – there would already be a great blog post, a library, or Stack Overflow answer written about it by someone. That’s what made PHP what it is today. Every developer starting with PHP feels right at home just because of this awesome community PHP has.

7. It’s as secure as any other language

Every language in the market does its best to be as secure as possible and so does PHP. However, despite all the effort, there would always be walls that can be climbed and locks that can be cracked with enough motivation. The programmer is responsible for the security as much as the language itself. A bad programmer will write bad and insecure code no matter the language. And that’s why sidelining PHP by stating that it’s not secure is plain naive.

Conclusion

PHP has always been popular; however, it has also been subjected to a lot of unnecessary hatred and criticism in the past. It carries this stigma of being a “Language for immatures” despite the fact that it has come a long way and now stands head to head with other languages. This has to change and with this article, I tried to contribute to that cause. There is no reason why PHP shouldn’t work as well as any other language for your next project. You should confidently choose it. Facebook did and so did Wikipedia & Mailchimp.
Images Credit: Benchmark, Google, Wappalyzer