The Origins of PHP: The Accidental Language That Runs Much of the Web
Most languages in this series were designed. Someone sat down with goals and a philosophy and built toward them. PHP is different. It was never meant to be a language at all. It began as a handful of small tools one developer wrote for himself, and it grew, feature by feature, into something that now powers a large fraction of every website you visit. Understanding PHP means accepting that its greatest strength and its longest-running criticisms come from the same source: it grew instead of being planned.
A personal tool, not a language
In 1994, Rasmus Lerdorf wanted to track who was looking at his online resume.[1] He wrote a set of small programs in C to do it and called them Personal Home Page Tools, or PHP Tools. They were not a language. They were a way to add dynamic bits to an otherwise static web page, like a visitor counter or a form handler.
People asked for the code, Lerdorf shared it, and the requests for features kept coming. In 1995 he released a version called PHP/FI, where the FI stood for Forms Interpreter.[2] It could handle web forms and talk to databases, which were exactly the things people building early websites needed. PHP spread not because it was elegant but because it solved the immediate, practical problems of putting a working site on the internet.
From PHP/FI to a real language
The turning point came in 1997, when two developers, Andi Gutmans and Zeev Suraski, decided PHP/FI was not robust enough for the e-commerce work they wanted to do. Rather than abandon it, they rewrote the core from scratch. That rewrite became PHP 3, released in 1998, and it is where PHP became a genuine programming language rather than a set of tools.
They also renamed it. PHP now officially stands for PHP: Hypertext Preprocessor, one of software's better-known recursive acronyms. Gutmans and Suraski went on to build the Zend Engine[3], the core that powered PHP 4 in 2000 and gave the language the performance and structure to run serious sites. The name Zend is a blend of their first names.
Why it spread so fast
PHP's growth had little to do with language design and everything to do with how it fit the web of its era. You could write PHP directly inside an HTML file, dropping dynamic logic into a page wherever you needed it.
<ul>
<?php foreach ($users as $user): ?>
<li><?= htmlspecialchars($user['name']) ?></li>
<?php endforeach; ?>
</ul>
That model matched exactly how people thought about building pages. Just as important, every cheap shared hosting provider supported PHP and a database out of the box. A beginner could upload a file over FTP and have a working dynamic site in minutes, with no build step and no server to configure. Each web request ran a script fresh and then threw everything away, which was simple to reason about and hard to break in catastrophic ways. For a generation of self-taught developers, PHP was the path of least resistance onto the web.
The reputation problem
PHP earned real criticism, and it is worth being honest about it. Because the language grew by accretion, its standard library is famously inconsistent. Function names and argument orders follow no single rule, a side effect of many people adding many functions over many years without a central plan. Early versions also shipped with features that made it easy to write insecure code, and a lot of insecure code was written. For years, saying you worked in PHP invited a certain look from engineers who used more carefully designed languages.
Some of that criticism was fair. Some of it ignored that PHP was doing the unglamorous work of running an enormous share of the actual web while the critics debated.
The quiet comeback
PHP did not stand still. PHP 7, released in 2015, rebuilt the engine and roughly doubled performance while cutting memory use, which mattered a great deal to anyone running PHP at scale. PHP 8, released in 2020, added a just-in-time compiler, named arguments, attributes, and other modern features. The ecosystem matured too. The Composer package manager brought sane dependency management[4], and the Laravel framework gave PHP a modern, well-designed way to build applications that attracted developers who would never have touched the language a decade earlier.
What it means today
PHP runs WordPress, which alone powers a large portion of all websites[5], along with Wikipedia,[6] much of Slack's back end in its early years,[7] and countless business sites and online stores. It is not fashionable, and it does not need to be. It is installed nearly everywhere, it is fast enough, and it does the job.
The lesson of PHP is that fit beats elegance more often than engineers like to admit. A language that was never designed, that grew out of one person's need to count visitors to his resume, ended up serving more of the web than almost anything built with grander intentions. It got there by being available, approachable, and good enough, and then it quietly improved until the old jokes stopped landing.