What does PHP so wrong that other languages don't?
The thing I hear over and over is that it's a loose language. Meaning you aren't forced to write very good code and it will still work. That's not something I would hate a language forever over. It's just different And newbie friendly
Basically the big problem is that it isn't consistent. Some of the API comes from C some from Perl. Each has different semantics.
Also prior to 5.4 error messages about missing or unexpected double colon operators threw a message about T_PAAMAYIM_NEKUDOTAYIM with no explanation of what that was. It's double colon in Hebrew, for anyone wondering.
There are a lot of little things that mostly work the same as other languages, but with subtle breaking differences.
Then there are issues with how it does variable variables that can lead newbies into terrible spaghetti messes.
In comparison learning something like Python is a joy. Within a couple of days of your first line of Python you'll be typing out large programs without a single syntax error.
You're correct, my issue with the article isn't the article itself, but merely the people posting it who has the slightest clue how PHP is doing or actually looking at the direction PHP is headed, what the community itself has accomplished with the tools and all the standards developers have developed with the language itself as a whole to negate the bad language design issues from years ago. Most just post that link because it's an easy shot at PHP because everyone else is shitting on it. Yes it sucks that they didn't drop the inconsistencies that PHP had prior to 5 because of backwards compatibility concerns (truth of the matter is a majority of the web is made up of PHP). With PHP 5 and later they've introduced extensions to stray away from those bad tendencies made by previous designers and as PHP gets more object oriented those functions will eventually get more obsolete (I'm hoping sooner than later). So yeah I think it's bullshit that people still post that article even though PHP has come a long way since those design fuck ups.
648
u/[deleted] Dec 02 '15
I never liked PHP and glad I don't work on it anymore. But I'm also glad I never turned as toxic as all the PHP haters in this thread.
It's just a language. Congrats to the PHP devs for getting another major release out.