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.
← Back to the graveyard

PHP: a fractal of bad design (2012)

D
DoubleMalt

There is one major reason why PHP is so popular: The step from HTML only to a slightly enhanced webpage with dynamic elements is easier than with any other language (JS included). Combine that with the simplicity of mod_apache (that is available on almost every web host) and it is the easiest way into programming. Create a mod_[ruby|python] that just evaluates ERB/Jinja templates and is as simple to integrate into apache and you might be able to do something good.

A
aruggirello

It's strange that, given how badly designed PHP really is, it's so surprisingly flexible that things like my PHP preprocessor can exist: https://news.ycombinator.com/item?id=7861616 I'm sure you could write a shorter, (maybe) faster, cleaner preprocessor for Python, Java or Erlang, but I'm not sure it would be a viable solution, there. With PHP, I got this 'mostly unused hash comments' thing readily available, like a low-hanging fruit. And then, there was token_get_all() - the sq

J
joesmo

At least half of these things are either examples of good design or neutral. That said, there isn't a single language for which I wouldn't be able to produce a laundry list of "bad design" that's equally as long and disturbing as this one. Insulting PHP developers and their work is certainly not the best way to "hurt" people's "opinion of PHP." It's a great way to come off as a pompous asshole, however.

T
tmikaeld

For someone new with PHP, this might be an eye-opener. How long would the list of problems be for any other non-statically typed language? Like for example, Javascript?

L
LukeB_UK

If you don't like PHP, you're in luck! There are many, many, many other languages you can use. Let other people make their own choices, no need to rant about a language you dislike to try and convince them to not use it.

23 pts Source: hackernews
View original →