What don’t you like about PHP?

Answered in Quora:

Q: What don’t you like about PHP?

It’s a ball of nails with almost no logic to it. From the perspective of software language design — as Tim Bray, co-creator of XML and at the time Directory of Sun Microsystems’s Web Technologies division, once said — “PHP is soul destroying.”

To take one of the most notorious examples: strpos and in_array.

In one, the order of variables is $needle, $haystack in the other it is $haystack, $needle. I challenge even the best PHP developers to remember which it is without a reference. Also, even though they both serve the same purpose they return different things and don’t obey a consistent naming convention: they should be named strpos/arrayin, posinstr/inarray or `str_pos`/`array_in`. That’s three terrible design choices in one single example!

Another example is the namespace separator in PHP is what is an escape sequence everywhere else \\. Why? Because by the time PHP added namespaces, they had run out of ASCII symbols for the lexer.

I could go on and on, but I won’t.

I love the language sometimes because I hate it so much. 😉

Come see my talk in February 2019 at SunshinePHP in Florida!

PHP is a dying language

Friend: http://twitter.com/markscrap/status/1228353533
Me: 10 to 1 whatever kid wrote that is a ruby developer
Friend: haha

I’m just stating the obvious. When the first computer was invented, the legendary Grace Hopper created the first compiled programming language. That language is still around and is still popular today!

Programming languages don’t “die,” they proliferate.

And when a person makes blanket statements like, “PHP is a dying language,” it allows me to a make blanket statement about that person’s programming preferences and maturity.

The difference is, my statement is probably right.