On June 8, 1995, Rasmus Lerdorf announced the first public release of PHP, and it was not a programming language. His post to a Usenet discussion group for web programmers began: “Announcing the Personal Home Page Tools (PHP Tools) version 1.0.”
“These tools are a set of small tight cgi binaries written in C,” the post said. The programs ran through the Common Gateway Interface, or CGI. They logged visits to your pages in private log files, showed that log in real time, kept daily and total access counters, could ban visitors by domain and helped you build simple forms.
Lerdorf had first used the tools to track visits to his own online résumé. Thirty-one years after that announcement, PHP is used by 69.7% of the websites whose server-side programming language can be identified by W3Techs, a company that surveys web technologies.
The language came later, and Lerdorf has said he did not set out to build one. “I had no intention of writing a language. I didn’t have a clue how to write a language,” he said in a 2012 talk at the O’Reilly Open Source Convention.
Tools first, a language later
CGI lets a web server hand a request to a separate program and send back whatever that program prints. Lerdorf released the source code along with the tools. That decision, PHP’s official history notes, let developers use the code as they saw fit and encouraged them to send in bug fixes and improvements.
The releases came quickly. In September 1995, the history says, Lerdorf briefly renamed the tools FI, for “Forms Interpreter,” and added Perl-like variables, automatic interpretation of form variables and code embedded in HTML, the markup language of web pages. FI kept spreading as a CGI tool, “but still not quite as a language.” In October he released a complete rewrite, “deliberately designed to resemble C in structure.”
By April 1996 he had combined the earlier names into PHP/FI, the version that, in the history’s words, “began to truly evolve PHP from a suite of tools into a programming language in its own right.” It had built-in support for several databases, cookies and user-defined functions. There were several minor contributors, but PHP/FI was “still primarily developed by an individual.” In 1997 and 1998 it had “a cult of several thousand users around the world.”
Why htmlspecialchars has such a long name
One shortcut from those early days survives in a function PHP still ships: htmlspecialchars. It converts characters such as the less-than sign (<) and the ampersand (&) into HTML entities, so that a browser displays them as text instead of reading them as markup.
In December 2013, a developer named Rowan Collins wrote to the internals mailing list, where PHP’s core developers discuss the language. He pointed out that some core function names follow neither of PHP’s usual naming patterns. He suggested that a stronger naming convention would probably have produced a different name than Lerdorf chose for htmlspecialchars. Lerdorf replied that “there were other factors in play there.”
“htmlspecialchars was a very early function,” he wrote. “Back when PHP had less than 100 functions and the function hashing mechanism was strlen().”
A hash table speeds up lookups by turning each name into a bucket number, so a program only has to search one bucket. When the hash function is strlen(), the C function that returns a string’s length, every name of the same length lands in the same bucket. To spread the functions out, Lerdorf explained, names “were picked specifically to make them fit into a specific length bucket.”
That was “circa late 1994,” he added, when PHP “was a tool just for my own personal use” and he “wasn’t too worried about not being able to remember the few function names.” The tool did not stay personal. The function is still part of PHP 8.
A language built by more than one person
PHP/FI 2.0 spent most of its life in beta. By the time it left beta in November 1997, its parsing engine “was already being entirely rewritten.”
The rewrite came from Andi Gutmans and Zeev Suraski of Tel Aviv. They were developing an e-commerce application for a university project and found PHP/FI 2.0 too inefficient and short of features they needed, so in 1997 they began a complete rewrite of its parser. To build on PHP/FI’s existing user base, the official history says, “Andi, Rasmus, and Zeev decided to collaborate in the development of a new, independent programming language.”
The result, PHP 3.0, was announced in June 1998 by “the new PHP Development Team,” which many new developers from around the world had joined. The name changed meaning, too. PHP now stood for “PHP: Hypertext Preprocessor,” a recursive acronym that “removed the implication of limited personal use” carried by the old name. At its peak, the history says, PHP 3.0 was installed on approximately 10% of the web servers on the internet.
Gutmans and Suraski then rewrote PHP’s core again. Their Zend Engine, whose name blends their first names, Zeev and Andi, appeared in mid-1999, and PHP 4.0, built on it, was released in May 2000.
What “creator of PHP” leaves out
Computerworld’s report on Lerdorf’s 2012 talk ran under the headline “PHP creator extolls language’s modest start,” and the label is fair as far as it goes. He wrote the original tools and was the main developer of PHP/FI.
But the PHP that spread from 1998 on was a joint project built on a rewritten parser, and the engine under PHP 4 came from Gutmans and Suraski. “Personal Home Page” fit a set of tools for one person’s site. “PHP: Hypertext Preprocessor” named a language with a team behind it.
When strangers inherit a shortcut
The strlen() trick made sense for a tool with fewer than 100 functions and one user who, by his own account, was not too worried about remembering a few function names. Then the code went public, the users grew into the thousands, and the reason behind the names disappeared from view. Renaming a function breaks every program that calls it, and htmlspecialchars kept its name.
In a personal tool you carry the context in your head: why a name is long, why a check is missing, why a file sits where it does. Once other people build on the tool, they inherit the shortcut without the context, and every new user makes it more expensive to undo.
A shortcut costs little while you are its only user. So before you publish a small tool, read it once as a stranger would, and ask which of its shortcuts you would still be willing to explain thirty years from now.
Related stories
Sources
- PHP Manual, “History of PHP”
- Rasmus Lerdorf, “Announce: Personal Home Page Tools (PHP Tools),” comp.infosystems.www.authoring.cgi, 8 June 1995, as reproduced in his talk slides
- Rasmus Lerdorf, “Re: Flexible function naming,” php.internals mailing list (17 December 2013)
- Joab Jackson, “PHP creator extolls language’s modest start,” Computerworld (19 July 2012)
- W3Techs, “Usage statistics and market share of PHP for websites” (11 October 2026)
- PHP Manual, “htmlspecialchars”
- Featured image: Rasmus Lerdorf at the New Zealand PHP Conference, 28 August 2014. Photograph by William Stadtwald Demchick, via Wikimedia Commons, CC BY-SA 4.0

Leave a Reply