Generators come to PHP
lornajane.net
lornajane.net
I've been working on some big PHP applications lately and I can say that the language is very much moving away from its past bad reputation.
PHP 5.4 is a quite modern language, with a pretty decent object-oriented structure, namespacing, lambdas, closures and most of the usual goodies.
It is true that you can still write terrible PHP even with the last version, but you don't have to. PHP has now most of the tools necessary so you can use it on pair with languages like Python or Ruby, and the new generators on 5.5 brings it even further.
One can write terrible code in any language though :). A language is only as good as the person using it, just as a canvas & brush is only as good as the artist. While some might complain it doesn't look as typographically pleasing as some other languages, as long it does not resemble COBOL or Visual Basic, I do not consider it hideous by any means.
I have no quarrel though with PHP since 5.3 really other than they need to write an Object Oriented front end for PostgreSQL for their API like they have for MySQLi. Using PostgreSQL in PHP with something like PDO doesn't work when you want to do asynchronous queries (which MySQLi and PostgreSQL support). I ended up writing a wrapper class sometime ago around the PostgreSQL PHP API just to deal with that issue, but official API support would be better.
I don't use PHP quite as much as Python for web stuff as I once did, but it would be my alternative goto (no pun intended[1]) language for web stuff.
"Decent object-oriented structure" doesn't help when the language still has so many primitive types. Namespaces don't help when most of the built-in and standard libraries live in the global namespace, C-style. The runtime is still creaky and inefficient.
There's not really any hate these days, just eye-rolling. You could be doing better things, but you're deliberately choosing not to, and harming nobody but yourself in the process.