PROGRAMMING LANGUAGES · EPISODE 8 OF 15 · 11 MIN ·

Why does a much-mocked language still run so much of the web?

Last time we ended on a number: 40.1 percent of all websites run on WordPress, and WordPress is written in PHP. Programmers have joked about PHP for years. One famous essay called it an embarrassment. So why does a much-mocked language still run so much of the web? And is the mockery deserved?

▶ Watch on YouTubePlay the whole Programming Languages series ▶

The full story

The episode's narration, word for word. Numbers link to the sources below; timestamps play that moment.

The question 0:00

Last time we ended on a number: 40.1 percent of all websites run on WordPress, and WordPress is written in PHP 1,2. Programmers have joked about PHP for years. One famous essay called it an embarrassment 3. So why does a much-mocked language still run so much of the web? And is the mockery deserved?

Check the premise 0:26

On the seventh of October 2026, the survey firm W3Techs found PHP on 69.8 percent of the websites whose server language it could identify 4. The next was JavaScript, on 7.6 percent 4. That's about nine times as many 4. One caveat: W3Techs can't identify every site's language, and it counts websites, not visits 4,5. Among people who answered Stack Overflow's 2025 developer survey, 18.9 percent had done serious work in PHP in the past year 6. Lots of sites, fewer people.

Where the code runs 1:11

So what is it? In episode four, JavaScript ran inside your browser. PHP runs on the server, the computer that hosts the website, and sends you only the HTML it generates 7. Your browser gets the result, and never sees the code that made it 7.

A résumé counter 1:30

It started small. Around 1994, a programmer named Rasmus Lerdorf wrote a few programs in the language C to track visits to his online résumé 8,9. He called them Personal Home Page Tools, or PHP Tools 8. In June 1995 he released the code for anyone to use, announcing it on a Usenet discussion group 8,10.

A page, built on request 1:57

Here's a PHP page, run for this episode. It's mostly HTML, the page's text and layout, with bits of code between special PHP tags 7. When a request arrives, the server runs the code from top to bottom, and whatever it prints becomes the page 7. This one counts a visit, then prints a heading and the count. What comes out is ordinary HTML 7.

Every request starts fresh 2:24

We asked the server for that page twice, and both times it said one visit. Each request runs the script from scratch, and its variables vanish when the page is sent 11. To remember you between pages, PHP uses sessions, data kept on the server under an ID your browser sends back 11. Think of a café that makes every order fresh and needs your loyalty card to know you. The analogy breaks a little: the server keeps its files and databases; only the script's working memory is wiped 11.

Never any intent 3:00

That's how PHP grew: one useful step at a time 10. Lerdorf said in a 2003 interview that there was never any intent to write a programming language, and that he just kept adding the next logical step along the way 10,12. By 1998 it had several thousand devoted users 8.

Names by length 3:20

That early improvising left fingerprints. In 2013, someone on PHP's developer mailing list held up a function called htmlspecialchars as an example of clumsy naming 13. Lerdorf explained. In late 1994, PHP had fewer than a hundred functions, and the way it looked them up depended on the length of their names 13. So names were picked to fit particular lengths, at a time when PHP was a tool just for his own use 13.

Filing by length 3:54

That lookup trick is called hashing: filing things in drawers chosen by a quick calculation, so you can find them fast 13. If too many names share a length, one drawer gets crowded, so you bend the names to spread them out 13. A proper hash mixes in every letter; length alone was a shortcut. And those hundred functions grew: this machine's PHP reports over two thousand.

A team and a name 4:22

In 1997, two developers in Tel Aviv, Andi Gutmans and Zeev Suraski, found PHP too limited for a university project and began rewriting it 8. With Lerdorf, they released PHP 3 in June 1998, and PHP now stood for PHP: Hypertext Preprocessor, an acronym that contains itself 8. At its peak, PHP 3 was installed on about ten percent of web servers 8. Their next engine, called Zend, powered PHP 4 in 2000 and PHP 5 in 2004 8.

WordPress 5:06

On the twenty-seventh of May 2003, Matt Mullenweg announced the first release of WordPress, free for anyone to use 14. He and Mike Little built it from an earlier blogging tool written in PHP 2. It's a content management system, or CMS: software for running a website without writing code for every page 1,2. Today W3Techs finds it on 40.1 percent of all websites, and on 58.6 percent of the sites that use any CMS it tracks 1. Wikipedia runs on PHP too 15.

The mockery 5:43

The most famous attack is a 2012 essay by a programmer who writes as Eevee, called PHP: a fractal of bad design 3. Virtually every feature in PHP is broken somehow, it says 3. Let's test two of its complaints, fairly.

When is zero equal to a word? 6:03

Complaint one: PHP's double equals sign 3. It compares loosely, converting values first, which PHP calls type juggling 16. Before PHP 8, comparing the number zero with the word foobar converted the word to a number, zero, so PHP said they were equal 17,16. PHP 8 changed that: here, it says false 17. But the text "1e3" and the text "1000" still count as equal, because both look like numbers 16. The fix is the triple equals sign, which also checks the type 16.

The global variable door 6:43

Complaint two: security, and here the critics have history on their side. Old PHP had a setting called register globals 18. Switch it on, and anything a visitor typed into a form or a web address became a variable in your script 18. PHP's own manual shows the danger: a script that marked logged-in users as authorised, but never set it to false for everyone else, could be switched on by a visitor 18. It was turned off by default in 2002, and removed in 2012 10,18.

Deserved, and not 7:18

So is the reputation deserved? Partly. The odd names, the loose comparison, the risky defaults were all real 13,18,17. But the manual makes a fair point: the setting wasn't insecure by itself, the misuse was 18. And PHP sold itself as extremely simple for a newcomer 7. A language that welcomes beginners collects a lot of beginners' code, and, arguably, the jokes stick to the language.

Facebook's engines 7:48

One giant site ran on PHP: Facebook 19,20. To make it faster, Facebook built a tool called HipHop that translated PHP into C++, then in 2011 released its own PHP engine, HHVM, which compiles code as it runs 19. That's the just-in-time compiling from episode two. In 2019, HHVM dropped PHP for Facebook's own spin-off language, Hack 19. But Dmitry Stogov, one of the developers who rebuilt PHP's engine, wrote that some speed-up ideas for the next version of PHP came from HHVM, among others 10,21.

PHP 7: twice as fast 8:35

That next version wasn't PHP 6 8. PHP 6 was planned around better support for the world's writing systems, and abandoned 8. So PHP jumped to 7, released on the third of December 2015 10. Its announcement promised code up to twice as fast as PHP 5.6, with much less memory 22.

Rules, if you want them 9:00

PHP 7 extended its type rules, which say what kind of value goes where, like the rules in episode six, to numbers and text 22,23. Turn on strict types, and a function that expects whole numbers refuses text 23. Run here, our add function returns five for two and three. Give it the text "2", and PHP refuses it with a type error 23. It's optional, switched on file by file, so old code still runs 23.

PHP 8: match 9:33

PHP 8 arrived in November 2020, with a new match expression 10,17. The older switch statement compares loosely, like double equals 16. Ask switch about the number 8.0, and it matches the text "8.0" first, which php.net's own example labels oh no 17,16. The new match compares strictly and picks the number 17. PHP 8 also added a just-in-time compiler, though php.net says typical applications run about as fast as on PHP 7.4 17.

Old code lingers 10:12

But websites don't upgrade themselves. Among sites using PHP, W3Techs finds nearly two thirds on version 8, and 7.8 percent still on version 5, from 2004 15,8. php.net only supports 8.2 and newer, and warns that older versions may have security holes that will never be fixed 24. Add up versions 7, 5 and 4, plus 8.0 and 8.1, and about half of PHP sites run a version with no security fixes 15,24,25.

So why? 10:49

So why does a mocked language still run so much of the web? Because it made building a web page easy from the start, and the most common software for building websites, WordPress, was written in it 1,7,2. The mockery was earned by early PHP, and much of it was fixed by modern PHP, though plenty of old code never moved 15,18,17. Next, a language people call slow. Why is a slow language the one everyone uses for AI?

Sources

Every factual claim in the episode is tied to one of these. Spotted an error? Tell us.

  1. W3Techs, "Usage statistics of content management systems", 7 October 2026 — w3techs.com
  2. Wikipedia, "WordPress" (accessed 7 October 2026) — en.wikipedia.org
  3. Eevee, "PHP: a fractal of bad design", fuzzy notepad, 9 April 2012 — eev.ee
  4. W3Techs, "Usage statistics of server-side programming languages for websites", 7… — w3techs.com
  5. W3Techs, "Technologies overview" and methodology — w3techs.com
  6. Stack Overflow Developer Survey 2025, Technology (programming, scripting, and markup… — survey.stackoverflow.co
  7. PHP Manual, "What is PHP?" (Introduction) — php.net
  8. PHP Manual, "History of PHP" — php.net
  9. Paul Krill, "Believe the hype: PHP founder backs Facebook's HipHop technology",… — infoworld.com
  10. Wikipedia, "PHP" (accessed 7 October 2026) — en.wikipedia.org
  11. PHP Manual, "Sessions: Basic usage" — php.net
  12. IT Conversations, "Rasmus Lerdorf, Senior Technical Yahoo: PHP", Behind the Mic,… — web.archive.org
  13. Rasmus Lerdorf, "Re: Flexible function naming", php.internals mailing list, 17… — news.php.net
  14. Matt Mullenweg, "WordPress Now Available", WordPress News, 27 May 2003 — wordpress.org
  15. W3Techs, "Usage statistics of PHP for websites", 7 October 2026 — w3techs.com
  16. PHP Manual, "Comparison Operators" — php.net
  17. PHP, "PHP 8.0 Released" — php.net
  18. PHP 5 Manual (legacy), "Using Register Globals" — php-legacy-docs.zend.com
  19. Wikipedia, "HHVM" (accessed 7 October 2026) — en.wikipedia.org
  20. Haiping Zhao, "HipHop for PHP: Move Fast", Engineering at Meta (Facebook Engineering),… — engineering.fb.com
  21. Dmitry Stogov (@dstogov), post on Twitter/X, 4 December 2015 — twitter.com
  22. PHP, "PHP 7.0.0 Release Announcement" — php.net
  23. PHP Manual, "Type declarations" — php.net
  24. PHP, "Supported Versions", 7 October 2026 — php.net
  25. W3Techs, "Usage statistics of PHP Version 8 for websites", 7 October 2026 — w3techs.com

Researched and scripted with AI assistance, fact-checked claim by claim, with synthetic narration and diagrams drawn in code. How we make episodes.

More from Programming Languages