Is PHP dying or does it just need an image makeover?
If you haven’t heard much about the PHP programming language lately, it might be because PHP’s Popularity Is Declining. In fact, the use of PHP relative to other languages has declined so precipitously that a Number of people are now ask the question“Is PHP Dying?”
The short answer is “probably not”. PHP is definitely not going away. However, it is fair to say that PHP suffers from an image problem and PHP developers should invest in making the language more modern.
The state of PHP in 2022
Doubts about the future of PHP can be attributed mainly to the fact that PHP’s popularity has steadily declined in recent years.
According to TIOBE indexPHP ranked fifth on the list of most popular programming languages in 2012. In 2017, it had slipped to sixth place and it fell to ninth place at the start of 2022.
Admittedly, a drop from fifth to ninth place over a span of a decade may not seem particularly notable. But it’s important given how central PHP, which originated in the mid-1990s, has always been to web programming. It’s no exaggeration to say that PHP, which was the first general-purpose programming language for building dynamic and interactive websites, created the web as we know it.
From this perspective, it is remarkable that the number of developers using PHP seems to be steadily decreasing.
Why PHP is (probably) alive and well
That said, it’s probably an overstatement to state that PHP is in a terminal state.
The main reason for this is that even though PHP isn’t as popular as it once was compared to other languages, it’s still absolutely central to some of the biggest platforms and websites in the world, such than WordPress, FacebookWikipedia and Soft.
If PHP were to die, entities like this would have to die with it – or be migrated to other languages, which would take so much effort and disrupt existing development ecosystems so much that it’s really hard to imagine that it happen.
For example, if WordPress developers wanted to port the platform to a different language, not only would it likely take years to complete the migration of WordPress itself, but virtually all WordPress plugins, themes, and other add-ons would also have to be rewritten. . This effort would be such a momentous undertaking, requiring the buy-in of so many different stakeholders, that it is basically impossible to see it come to fruition.
It’s also worth noting that the PHP development community remains alive and well, despite outsiders’ doubts about PHP’s long-term viability. The most recent new major version of the language, PHP 8, debuted not so long ago. Popular PHP frameworks, like Laravel, also remain very active.
Finally, it’s important to remember that a decline in popularity of PHP on lists like TIOBE does not mean a decline in overall usage. It just means that PHP is used less often than other languages - not that a lot of developers are migrating existing applications from PHP to another language.
The future of PHP
So, I’d bet my money on PHP remaining a major programming language for the foreseeable future. Nevertheless, I think changes are afoot in how PHP works and how it is used by developers. Specifically, we’ll likely see changes designed to improve PHP’s image as a modern language that remains relevant in the cloud-native era.
Above all, I expect we will see continued efforts by the PHP development community to make PHP itself more developer-friendly. This was one of the main goals of the PHP 8 release, and I don’t think the effort will stop there.
I also imagine that PHP developers will invest in strengthening the image of PHP as a secure language. This will require less technical than cultural changes. PHP is just as fundamentally secure as other traditional web programming languages, but it seems to suffer – probably unfairly – from a reputation for insecurity in some people. For this reason, I wouldn’t be surprised if, in future releases, PHP developers put special emphasis on improving PHP security.
Launch PHP adoption
Such changes are necessary because ultimately, for PHP to continue to thrive for the next quarter century of its life, more developers need to perceive PHP as a “modern” language.
Currently, it’s easy for PHP to look like a language that lives on in the past. And it’s no coincidence that most of the major platforms that use PHP – like WordPress, Facebook, and Wikipedia – date back to the early 2000s, when PHP was much younger and trendier. Other than exceptions like Slack, you don’t see many new platforms built with PHP today.
If PHP can update its outdated image, it will not only stop losing popularity, but maybe even move up the list. After all, it’s not like languages inevitably lose popularity as they get older. For example, Python (which appeared in the early 1990s) is several years older than PHP, and no one is accusing it of dying. But that’s probably because Python still enjoys the image of a modern language, while PHP feels somewhat dated.
All of the above is to say that while PHP is almost certainly not dying, its popularity is declining. But this is mainly due to a perception problem more than a technical problem in the PHP language. Small improvements in areas like usability and security could go a long way to improving PHP’s image and ensuring it continues to thrive in the future.