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.
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.
- 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.
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."
What languages (as a replacement for PHP) have better error messages?
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!
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.