Why you shouldn’t be afraid to embrace PHP anymore!

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

9 mins read
January 15, 2021
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 :).

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.

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.

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.

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

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.

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.

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

Ankit Kumar

Solution Architect

Ankit is an AWS certified Solution Architect holding more than a decade of experience in the software development Industry. Whether it’s evaluating the technical needs of startup projects and suggesting the right technologies accordingly or developing and improving our technical solutions to shape the long-term vision of enterprise applications, Ankit has always proved himself to be one of the best tech leaders in the industry with validated technical skills and cloud expertise. Possessing a master's in Information Technology (IT) and having his technical career started early during higher studies, he has been remarkably groomed in all the segments of software development - from planning to designing and testing including all the tech stacks and architectures. Holding great technical and management skills he becomes an all-rounder. If not working, he likes to read industry news, about new technologies, or anything that enhances his knowledge base and grows his overall capabilities.

    Related Articles