PHP: The Language Built to Track a Resume
Zusammenfassung
PHP was created in 1994 by Rasmus Lerdorf to track who was visiting his online résumé on the World Wide Web. He called it “Personal Home Page Tools” — a set of CGI scripts written in C that logged visitor data to a text file. When other developers found the scripts useful, Lerdorf released them publicly. PHP now runs approximately 77% of all websites with a known server-side language. It is the accidental foundation of a significant portion of the internet, including WordPress, Facebook (original version), and Wikipedia.
The Résumé Problem
In 1994, the World Wide Web was young enough that having a personal website was unusual. Rasmus Lerdorf, a Danish-Canadian programmer, put his résumé online and wanted to know when people looked at it. The web’s logging infrastructure of 1994 was crude; he wrote his own tools.
His solution was a set of CGI (Common Gateway Interface) scripts that intercepted HTTP requests, logged visitor data, and then served the requested HTML. He named the package “Personal Home Page Tools,” abbreviated PHP. The tools were functional but crude: they added dynamic behavior to what would otherwise be static HTML pages.
When Lerdorf posted his scripts to Usenet in June 1995, other web developers found them useful for similar tasks — tracking visitors, generating dynamic content, processing form submissions. He expanded the package and released PHP/FI 2.0 in November 1997, which added database access and improved the form processing capabilities.
From Perl Replacement to Architecture
PHP’s adoption was rapid and driven by pragmatic need. In the mid-1990s, adding dynamic behavior to a web page typically required writing Perl scripts or compiled CGI programs. Perl was powerful but complex; compiled programs required compilation. PHP provided a middle path: code embedded directly in HTML, executed on the server, easy enough for web designers who were not professional programmers.
PHP 3 (released June 1998, rewritten from scratch by Andi Gutmans and Zeev Suraski) and PHP 4 (2000) transformed it from a personal tool set into a general-purpose web scripting language. The name was recursively redefined: PHP now officially stands for “PHP: Hypertext Preprocessor” — a recursive acronym that acknowledges the original name was never appropriate.
What PHP Powers
The scale of PHP’s deployment is remarkable given its accidental origins:
- WordPress (PHP): powers approximately 43% of all websites
- Wikipedia: originally MediaWiki, written in PHP
- Facebook: Zuckerberg wrote the original thefacebook.com in PHP; Facebook later developed HHVM (HipHop Virtual Machine) to compile PHP to native code for performance
- Drupal, Joomla, Magento: major CMS and e-commerce platforms, all PHP
The language has persistent reputation for poor security practices: early PHP made it easy to write SQL injection vulnerabilities, file inclusion attacks, and XSS bugs. The language’s design — implicit variable creation, register_globals, magic quotes — provided footguns that millions of developers used. PHP 7 (2015) and PHP 8 (2020) addressed many historical problems, but the large legacy codebase of PHP 4/5 applications maintains the security reputation.
Lerdorf himself has been characteristically self-deprecating: “I’m not a real programmer. I throw together things until it works then I move on. The real programmers can say ‘Yeah it’s really flawed but it works.’”
📚 Sources
- Lerdorf, Rasmus: “PHP/FI — Personal Home Page / Forms Interpreter” — original README, 1995 (archived at github.com/php/php-src)
- Tatroe, Kevin, MacIntyre, Peter & Lerdorf, Rasmus: Programming PHP, 4th ed. (2020), O’Reilly — historical introduction
- PHP: History of PHP — php.net Manual (PHP/FI 2.0 and PHP 3.0 release timeline)