A Brief History of PHP and What the 2021 PHP Hack Was Really About
Bridges AI
AI Strategy & Engineering
If your organization has a website, PHP is probably running it. That's true for a municipal tax office's public page, a law firm's WordPress site, and a school district's portal alike. PHP rarely gets mentioned, but it's one of the most widely used pieces of software on the internet. That's why a 2021 security incident at the PHP project drew so much attention, even though most people never noticed it happened.
This post covers where PHP came from, how it grew, what the hack involved, and what it means for anyone responsible for a website today.
Where PHP Came From
PHP started in 1994 as a personal project. A programmer named Rasmus Lerdorf wrote a small set of tools in C to track visits to his online resume, and he called them "Personal Home Page Tools." He released them publicly in 1995. Other developers found them useful for building simple dynamic pages, such as forms, guestbooks, and pages that pulled data from a database.
The idea behind PHP was simple: you could put code right inside an ordinary HTML page, and the server would run that code before sending the page to the visitor's browser. Compared with other ways of building websites in the mid-1990s, it was easy to learn and easy to deploy.
How PHP Grew Up
PHP changed a lot over the next three decades. The key milestones:
- PHP 3 (1998): Andi Gutmans and Zeev Suraski rewrote the core, and the name became the recursive acronym "PHP: Hypertext Preprocessor." This was the version that made PHP a real language instead of a toolkit.
- PHP 4 (2000): Introduced the Zend Engine, a faster and more modular core.
- PHP 5 (2004): Brought serious object-oriented programming and better database tools. It powered the web for more than a decade.
- PHP 6 (never released): An ambitious attempt to rebuild PHP around Unicode stalled and was abandoned. To avoid confusion, the project skipped the number entirely.
- PHP 7 (2015): A major performance overhaul. Many sites roughly doubled their speed just by upgrading.
- PHP 8 (2020 onward): Added a just-in-time compiler, stricter typing, enums, and many modern language features. The 8.x line has had a new release every November since.
Along the way, PHP picked up a reputation for messy, inconsistent design, and some of that criticism was fair. The language today is much more disciplined than the PHP of 2005, but a lot of old code from that era is still running.
One side note: if you've heard of "Hack" in connection with PHP, that's a different thing. Facebook was built on PHP. To get more performance out of it, Facebook created its own PHP engine (HHVM) and in 2014 released a PHP-derived language called Hack. It's an interesting chapter, but it isn't the hack this post is about.
Why PHP Ended Up Everywhere
Three things put PHP on most of the web:
- Cheap hosting supported it. Nearly every low-cost web host offered PHP out of the box, so small organizations could get started for a few dollars a month.
- WordPress. WordPress launched in 2003 and is written in PHP. It now runs a large share of all websites, along with tens of thousands of plugins and themes that are also written in PHP.
- It was approachable. A non-specialist could copy a snippet, change a few lines, and have a working contact form. That accessibility built a huge community. It also left behind a lot of code that nobody has looked at in years.
Industry surveys still find PHP behind roughly three-quarters of websites whose server-side language can be identified. Whatever happens to PHP affects a very large part of the web.
What the Hack Was About
What happened
On March 28, 2021, two suspicious changes showed up in the official PHP source code repository. That repository is the master copy of the language that every PHP installation ultimately comes from. The changes were labeled as routine typo fixes. They were made to look like they came from Rasmus Lerdorf himself and from Nikita Popov, one of the project's most active core developers.
They weren't typo fixes. The changes added a backdoor. If a web request included a specially named header (spelled "User-Agentt," with an extra t) whose value started with the word "zerodium," PHP would run whatever code the attacker included. Anyone who knew the trick could have taken over a server running a PHP build that contained the change.
The word "zerodium" referred to a well-known company that buys security exploits. The company denied any involvement, and the reference was most likely a taunt or a misdirection.
How it was caught
The backdoor never reached a public release. PHP developers review changes to the source code, and within hours someone noticed that the "typo fix" didn't fix any typos. The changes were reverted, and the project started investigating.
The investigation found that the attackers probably hadn't broken into the code server directly. The evidence pointed to a leak from the system that managed developer accounts and passwords. The attackers seem to have used valid credentials to push code under other people's names.
What changed afterward
The PHP team responded quickly:
- They shut down their self-hosted code server and moved the official repository to GitHub. GitHub offers stronger account security, two-factor authentication, and better controls over who can change what.
- They reset passwords and rebuilt the account system with stronger password storage.
- They tightened who has write access to the core code.
The lesson isn't that PHP is unsafe. It's that even a well-run, widely watched open source project can be attacked through something ordinary, like a password database. What saved the project was review: people actually read the changes. Most small-organization websites have no equivalent review step at all.
What This Means for Your Website
You don't run the PHP source repository, but you do run software built on it, and the same principles apply. Here's what to check:
Know which PHP version you're running
Each PHP release gets security fixes for a fixed period and then stops getting them. As of late 2026, PHP 8.1 and everything older no longer receive security patches. PHP 8.2 reaches end of life on December 31, 2026. If your host is still running PHP 7.x, which is common on older hosting plans, your site is running on software that hasn't been patched in years. Your hosting control panel or your web developer can tell you the version in a couple of minutes.
Audit your plugins and themes
Most real-world WordPress compromises come through outdated or abandoned plugins, not through PHP itself. Remove anything you don't use, and replace plugins that haven't been updated in a year or more.
Protect the accounts, not just the code
The 2021 hack worked because of compromised credentials. Turn on two-factor authentication for your hosting account, your site admin logins, and your domain registrar. Remove logins for former staff and vendors.
Remember your obligations
New Jersey law requires businesses and public entities to notify affected residents when certain personal information is compromised. If your site collects client intake forms, tax appeal documents, or student information, an outdated server is a legal and reputational problem as well as a technical one.
Decide whether to upgrade or move on
For some organizations, the right answer is a careful upgrade to a supported PHP version. For others, especially those running a site that was custom-built fifteen years ago, it makes more sense to move to a modern, actively maintained platform. In either case, the move should be planned, tested, and documented, not done in a hurry after a breach.
Need Help Moving Your Site?
If you're not sure what your website is running on, or you know it's overdue for an upgrade, Bridges AI can help. We work with New Jersey assessors, law firms, schools, real estate professionals, and small businesses to audit existing sites, upgrade them safely, or move them to a modern platform without losing content or search rankings. Book a conversation with our team and we'll help you figure out the right next step.
Related posts
Why PHP Keeps Getting Hacked -- and What AI Found That Humans Missed
PHP quietly runs most of the web, including much of New Jersey's. Here is the real flaw, how AI finds this bug class, and how to check your stack.
TechWhy We Partnered With an AI Consulting Firm in Tampa Bay
Bridges AI is teaming up with Tampa Bay firm CMoreFlo on client builds. What the partnership covers, how client data stays protected, and what changes for NJ clients.
TechFrom \"AI\" to \"Super Intelligence\": What the Terminology Shift Means for Vertical Software
Why vertical software vendors are swapping \"AI\" for \"super intelligence\" - and the questions New Jersey buyers should ask before signing.