PHP is Dead

A living memorial to a dying language

Days since declared dead: 5,024
Meanwhile, 77% of the web still runs PHP... PHP stands for 'PHP: Hypertext Preprocessor' which stands for 'PHP: Hypertext Preprocessor: Hypertext Preprocessor'... WordPress alone powers 43% of the internet. Yes, that's PHP. PHP was originally called 'Personal Home Page Tools.' Peak 1995. In PHP, 'T_PAAMAYIM_NEKUDOTAYIM' is the error for '::'. It's Hebrew. Because why not. PHP has both array_key_exists() and in_array(), and they take arguments in opposite orders. The PHP elephant mascot is called 'elePHPant.' They were proud of that. MySQL_real_escape_string exists because mysql_escape_string wasn't escaping things... for real.

Hall of Fame

The highest-scoring PHP roasts of all time

HN 765 pts

PHP: A fractal of bad design

K
kmavm

"(And strictly speaking, Facebook isn’t written in PHP; it’s written in a C++ macro language with a striking resemblance.)" I'm a Facebook engineer who works on the HipHop compiler and HipHop virtual machine. It's in PHP, absolutely full stop. It's amazing how much the fact that g++ is involved somewhere in the toolchain confuses people in this matter. C++ is just an intermediate representation; the source language really is warts-and-all PHP.

O
Osmose

I'm going to be unfair and quote just two words from the article: > empowered amateur PHP is a gateway drug to web development. And that's awesome. With almost every other popular web development language I've heard of[1], there's this grey area between "my app works on my local machine" and "my app works on the server" that is really hard to grok as a beginner. There's a reason entire businesses are built on the idea of making this easy. With PHP? You get an apache box with PHP, you put

E
ericd

Meh, I've written a lot of PHP code. I also work in Ruby and Python. All three have problems, but I like all three. With PHP, you have to develop a coding style that naturally avoids PHP's weird areas. It's not really that hard to avoid the mines, but you do have to be aware of them. In exchange, you get a scalable web server and a language that requires minimal babysitting. Instead of automatically throwing a 500 on a random, unimportant, uncaught exception, PHP makes a best effort, and most

+3 more replies...

HN 57 pts

Why people hate PHP, a book from hell

A
aikah

TLDR; op blames awfull books that spread bad practices and then made PHP code ugly and insecure. I personally don't care about PHP. Now the PHP community is kinda funny. Basically there are the people that use PHP as poor man's java, that feel the need to write 50 design patterns per file, who hates the other part of the community, the one that couldn't care less about "software engineering best practices". So it's not much that people hate PHP, more like PHP developpers hate other PHP devel

E
erikb

I think PHPs big strength is the other point mentioned in the post: It enabled lots of people who are not really programmers to do some programming. Some of them developed into serious developers, some of them didn't. Being able to produce something slightly meaningful even without any skill is a big accomplishment, but it also means loads of erros, over estimated skill levels, security holes, unreadable code etc. The reason this doesn't happen to Haskel is that you become a computer scientist f

O
overshard

Most of my hate is not directed at PHP but rather the code of the projects I run across written in PHP. It's not uncommon for there to be random whitespace and code thrown everywhere with no heed to a sensible MVC or other software architectural pattern. I do occasionally run into well written and maintained software written in PHP and, while it's not my prefered language, it's quite readable and I can work with it. PHP does have it's issues but they are exacerbated by the general community th

+2 more replies...

HN 57 pts

Ask HN: Why has nobody built a better Wordpress?

K
krapp

Wordpress is terrible, but none of the ways in which it's terrible matter. From the point of view of the user, Wordpress is incredibly simple and intuitive. Don't underestimate how important it is for the average user to never see a terminal, and rarely if ever see the source code, for the application to feel comfortable to people most familiar with Windows applications and web forms. Anything more technical than that is intimidating. Most people who use Wordpress aren't programmers, don't wan

A
alexpatin

This is my first HN comment - I must be the only WP developer who reads Hacker News or something. Let me preface this by saying I'm not going to be repeating what's already been said about non-technical user friendliness. WordPress was my gateway in 2008-9 to web development. back when I was still a graphic design student. I started off hacking away at themes with my extremely limited HTML / CSS / PHP knowledge back then. Shit, my Google-fu was't really even halfway decent then. Toda

N
nnain

> Wordpress is terrible That's open to debate. I have 3 websites running on Wordpress, I don't have the intent to use anything else. It's simple and comes with batteries attached, especially for people who aren't hacking the code themselves. The plugins/themes are a big plus and so is the community. In what way is it terrible? Have you used it enough? > CMS as a whole is bad No. CMSes serve a purpose and serve it well. Btw, TechCrunch, Fortune.com run on Wordpress too. > Why has no one

+3 more replies...

HN 21 pts

Why so much hate for PHP?

N
natmaster

TL;DR: Because we used it. Like many people, many years ago I learned php. It was easy to deploy, and make simple dynamic websites. Many hosting services provided support for it. I was quite happy to use it for these things. Then in 2008 I interned at Facebook. At the time, there had not yet been any attempts to improve the language by Facebook itself. Using php in an actual codebase - real world software - made me realize just how terrible it was. I vowed to never use it again. I even present

M
MAGZine

A quick dive into any PHP-related topic on HN should yield significant answers. Part of the hatred comes from the fact that the way people know PHP is from 2005, when it was essentially one really long procedural program. It's not so much that people ignore the recent upgrade in tooling/modern language constructs so much as people aren't familiar that they exist. However, these is still a lot of vitrol for PHP. Because it is so easy to use, many people are able to pick it up without any pr

M
moreentropy

There are a lot of reasons already discussed, this one is especially famous: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de... PHP is not a exceptionally bad platform from a technical perspective, it usually gets the job done, is reliable, easy to operate and performant. But i guess the real reason why so many developers - including me - hate PHP is that plain PHP is pretty boring. It doesn't have opinions on anything and no exciting concepts or

+3 more replies...