3 ms·
Haters gonna hate, but I enjoy PHP. For those who say PHP is sloppy and lacks substance, that's because you write it that way. A lot of the complaints that peop
by tmh88j 15y ago
Haters gonna hate, but I enjoy PHP. For those who say PHP is sloppy and lacks substance, that's because you write it that way. A lot of the complaints that people have are long gone: - lack of namespace: they exist
-goto lines: no one forces you use them!
-inconsistent function naming conventions: you choose the names...
-magic quotes: no longer exist
My point is there are a lot of people who hate on PHP, but the majority of complaints are issues that you bring to the table. Regardless, I enjoy other languages too. I've been picking up on python recently and it's very enjoyable.
- blindhippo 15y agoMost of the people who hate on PHP are likely not programming the sort of application that PHP is used for. I generally ignore a .NET/Java/C++ developer crapping all over PHP. Ruby/Python dev's I pay attention to on the other hand, if only because those two languages interest me. That said, where I am, PHP/Javascript is where the money is, so clearly they are my favorites!
- greyfade 15y agoQuite the contrary. I hate on PHP pretty hard... Because writing a PHP web application is my day job. My own complaints of the language (which others have already voiced) are problems that I run into frequently enough to have flown into a wild rage at the office on more than one occasion. PHP was incompetently designed by an incompetent bunch of programmers. And it shows. And it attracts even more incompetent programmers who don't know better.
- deleted 15y ago[deleted]
- Tangaroa 15y agoWhat do you mean by "you choose the names" with regard to PHP's inconsistent naming conventions? I think most of the upset is due to the standard array functions which can be either array_action($array, $arg) or array_action($arg, $array).
- Pewpewarrows 15y agoSorry, but my primary complaints of PHP are in no way related to anything that I've "brought to it." These are all default behavior out of the box: - Error messages that are often nowhere near where the problem is, and sometimes contain no stacktrace - PHP-provided function names are inconsistent and follow no set convention, mostly because the language was built without Objects or Namespaces - The arguments to PHP-provided functions are arbitrarily ordered (such as array manipulations, and string searching). I have to look them up every... single... time. - Core features of basically every other popular dynamic language took years to arrive in PHP. Hell, it didn't even get a real shorthand array syntax until a few months ago. - Backwards design decisions, such as having sort-related functions modify data structures in-place. - Completely insecure on a default install. No directory traversal protection, combined with having urls map directly to on-system files, is a recipe for disaster. - No isolation or easy support for simultaneous PHP working copies. If I want to work locally on 2 separate PHP projects, each requiring different PHP versions and different (often conflicting) libraries, I have to pollute my entire global workspace. I could go on, but it's making my blood boil recalling the times I had to deal with this foul stain of a language. There is no reason for a self-respecting developer to ever choose it, especially when alternatives like Python or Ruby exist. Period.
- greyfade 15y agoThere's still the problem of tutorials: There are tons of bad tutorials out there that teach people to write insecure, sloppy, and un-substantive code. The result is a plethora of bad PHP programmers who don't seem to understand seemingly simple concepts like global variables. And much of the practices that result from it are considered idiomatic. Some of the error messages that PHP spits out are incomprehensible at best, and misleading at worst. Broken code quickly becomes a nightmare. And frankly, the fact that Rasmus Lerdorf doesn't like programming shows pretty well in the language. His incompetence is all over its "design."
- bsphil 15y ago>Some of the error messages that PHP spits out are incomprehensible at best, and misleading at worst. What languages (as a replacement for PHP) have better error messages?