PHP: a fractal of bad design (2012)
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.
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
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.
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?
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.