Who Needs PHP Anymore?
Tags: php, programming, webdev
Published: 2022-07-11 09:27:31

[PHP](https://radixweb.com/php-development) is the mainstay of the world wide web today. Over three quarters of all the sites in the world are powered by PHP at the moment. When it comes to server-side programming languages, PHP has no competition.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uf2il6dqlqwf51flwida.png)
And yet, there are significant undercurrents in the developer community against PHP. PHP is the most hated mainstream programming language after the obvious culprits such as C, Perl, Assembly and VBA. Even C++, Java and Ruby fare better, according to a Stack Overflow survey. And it’s the butt of frequent jokes in the community.

And yet, there are significant undercurrents in the developer community against PHP. PHP is the most hated mainstream programming language after the obvious culprits such as C, Perl, Assembly and VBA. Even C++, Java and Ruby fare better, according to a Stack Overflow survey. And it’s the butt of frequent jokes in the community.

So why did PHP lose its popularity over the years? What are the challenges, pros and cons in using PHP to build websites? Is it relevant to today’s web? Will it remain relevant tomorrow? Let’s attempt to answer these questions.

## The Reality of the Web is Interwoven with that of PHP
Even if all developers and webmasters resolved to stop using PHP today, they couldn’t because WordPress, the most common and most popular content management system (CMS) on the internet, is written on PHP. A staggering 43% of sites today run WordPress – and the number is only slated to increase, as per data from W3Techs.

But you may be forgiven for thinking that PHP is used primarily as a base for CMS. A technology so deeply entrenched and with such large a community cannot live or die on the back of one application. Here’s what over 600 development teams all over the world are using PHP for at the moment, according to the Zend PHP Landscape report:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vul59y3v0ap3a9h279tc.png)
So what’s the problem? Why are we even talking about the need for or future of PHP?

## What’s Wrong with PHP?
PHP was never intended to be a widely used programming language. The man who created PHP in 1995 – Rasmus Lerdorf – is known for bashing his creation as well as his own programming skills. “I really don’t like programming. I built PHP to program less so that I could just reuse code,” Lerdorf is known to have said.

In an [interview with SitePoint](https://www.sitepoint.com/phps-creator-rasmus-lerdorf/), he went one step further in belittling PHP. “PHP is about as exciting as your toothbrush. Who would want to read about toothbrushes?”

Given the unintuitive, unremarkable and inconsistent nature of PHP’s syntax as well as the poor design principles it is built on, many developers agree with Lerdorf in principle. Even though PHP is a whole 27 years old, it’s only in its 8th major version. The pace of updates and incremental updates to the core is painstakingly slow and erratic.

Speaking of unintuitive and unremarkable, there is the question of the alternatives and comparable languages.

The closest competitor – in terms of perceived and visible popularity – is Python, which developers love for its simplicity and flexibility. Python is a server-side language like PHP but it’s designed in a way that developers need to write a lot less code. While barely a fraction of websites run on Python today, it has emerged as the #1 choice for AI and ML programming as well as anything related to big data.

Then there is JavaScript. While it’s a client-side scripting language (and so, an apples-to-oranges comparison with PHP), the rise of Node.js and other frameworks for JavaScript facilitates server-side scripting as well as full-stack development, which PHP doesn’t. JavaScript fuels single-page applications such as Google Drive, where the page is re-rendered at lightning speed using data from API calls, eliminating browser refreshes. This would be pretty hard to replicate using PHP.

So what’s keeping PHP alive and kicking?

## What’s Right with PHP?
PHP has many great things going for it – apart from the gigantic installed base.
**Tried and tested code**
An undeniable advantage of PHP is that every imaginable function has been written, shipped and used over the past 27 years. There is barely anything you can’t make a PHP-based website do. Developers can rest easy knowing that any issue that comes to the fore has been (or will be eventually) faced and resolved.
**Huge community**
While the latest breed of developers has come to hate it, veteran developers have built entire careers on PHP. They’ve put a ton of tips, tutorials and FAQs out there that answers pretty much any question even an experienced developer can have.
This is a good thing for businesses and organizations too – if you’re looking to build a website or web application, you have a huge pool of skilled and knowledgeable developers to choose from.
**Extendibility**
Given its long history and community of expert developers, PHP has amassed a massive library of functionalities, plugins, frameworks and so on over the years. There’s hardly anything that you might need to code from scratch. PHP frameworks such as Laravel, CodeIgniter and Yii speed up and standardize development on top of readymade, generic functionality.
Further, there are also a ton of sites that provide readymade PHP scripts for niche-specific functionality like ecommerce carts, listings, polls, calendar booking, etc. that allow you to accelerate the application development life cycle without foregoing performance.
**Database connectivity**
The biggest advantage PHP has over competing languages like Python is its database connectivity. PHP connects securely and easily with almost any kind of database, giving developers the leeway to choose from a wide variety of database programs available today. It also serves to improve their productivity by focusing on app and service development rather than database integrations.
**Versatility**
PHP is free and open source in every sense of the terms, unlike other programming languages, applications and operating systems. This means PHP has a vast number of developers constantly providing support, implementing cutting-edge features, fixing bugs and vulnerabilities, and adding new components.
PHP comes pre-installed on web servers in the form of a “LAMP” box (Linux, Apache MySQL, PHP). And yet, it’s platform-independent – you can run it on Windows, Mac OS or Linux. What’s more, it supports every browser you’ve probably heard of.

**The Verdict**
To answer the question in the title, this article is delivered to you by a website that’s built on PHP. So even if you’ve even skimmed up to here, you can deliver the verdict yourself!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aujm5ob09d8s3nwwo34i.png)