PHP written in metal surrounded by tools Getty Images

Is PHP Dying? No, but It Has an Image Problem

Because PHP remains central to some of the largest websites, it isn't going away. But the language is in dire need of an image makeover.

If you haven't heard much about the PHP programming language lately, that may be because PHP's popularity is waning. In fact, the usage of PHP relative to other languages has declined so precipitously that a number of folks are now asking the question, "Is PHP dying?"

The short answer is "probably not." PHP is almost certainly not going to disappear. However, it is fair to say that PHP is suffering an image problem and that PHP developers should invest in making the language "feel" more modern.

The State of PHP in 2022

Doubts about PHP's future can be attributed mostly to the fact that PHP's popularity has been steadily slipping in recent years.

According to the TIOBE Index, PHP ranked fifth on the list of most popular programming languages as recently as 2012. By 2017, it had slipped to sixth place, and it fell to ninth place by the start of 2022.

Admittedly, a decline from fifth to ninth place over a period of a decade may not seem especially notable. But it is significant given how central PHP, which originated in the mid-1990s, has traditionally been to web programming. It's not a stretch to say that PHP, which was the first general-purpose programming language for creating dynamic and interactive websites, created the web as we know it.

Viewed from that perspective, it is remarkable that the number of developers using PHP seems to be declining steadily.

Why PHP Is (Probably) Alive and Well

That said, it's probably an overstatement to declare that PHP is in a terminal state.

The biggest reason why is because, even if PHP is not as popular as it once was compared with other languages, it remains absolutely central to some of the world's largest platforms and websites — such as WordPress, Facebook, Wikipedia, and Slack.

If PHP were to die, entities like these would have to die with it — or be migrated to other languages, which would require so much effort and cause so much disruption to existing development ecosystems that it's really hard to imagine it happening.

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 every WordPress plugin, theme, and other add-on would also have to be rewritten. This effort would be such a momentous undertaking, which would require buy-in from so many different stakeholders, that it's basically impossible to see it actually taking place.

It's worth noting, too, that the PHP development community remains alive and well, despite doubts from outsiders about PHP's long-term viability. The most recent major new release of the language, PHP 8, debuted not that long ago. Popular PHP frameworks, like Laravel, remain quite active, too.

Finally, it's important to remember that a decline by PHP in popularity on lists like TIOBE doesn't mean a decline in total usage. It just means that PHP is being used less often compared with other languages — not that large numbers of developers are migrating existing applications from PHP to a different language.

The Future of PHP

So, I'd bet my money on PHP remaining a major programming language for the foreseeable future. Nonetheless, I think changes are in store for the way PHP works and how it is used by developers. Specifically, we'll likely see changes designed to improve the image of PHP as a modern language that remains relevant in the cloud-native age.

Above all, I expect that we'll see continuing efforts by the PHP development community to make PHP itself more developer-friendly. That was one of the major focuses with the PHP 8 release, and I don't think the effort will end there.

I also imagine PHP developers will invest in bolstering PHP's image as a secure language. This won't require technical changes as much as cultural ones. PHP is just as fundamentally secure as other mainstream web programming languages, but it seems to suffer — probably unfairly — from a reputation for insecurity among some folks. For that reason, I wouldn't be surprised if in future releases PHP developers place special emphasis on enhancing the security of PHP.

Jump-starting PHP Adoption

Changes such as these are necessary because ultimately, for PHP to continue thriving 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 and feel like a language that continues to live in the past. And it's not a coincidence that most of the major platforms that use PHP — like WordPress, Facebook, and Wikipedia — date to the early 2000s, when PHP was much younger and hipper. With exceptions like Slack, you don't see a lot of brand new platforms being built with PHP today.

If PHP can update its stale image, it stands not only to stop dropping in popularity, but perhaps even to climb back up the list. After all, it's not as if languages inevitably fade in popularity as they age. 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 being a modern language, whereas PHP feels somewhat dated.

Conclusion

All of the above is to say that, while PHP is almost certainly not dying, it is waning in popularity. But that's mostly due to a perception issue more than any technical ones within the PHP language. Small enhancements in areas like usability and security could go far toward improving PHP's image and ensuring that it continues to thrive into the future.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish