PHP gets a lot of hate because of internal inconsistencies and sometimes bizarre pass-by-reference semantics, but I mostly get annoyed at how dog slow it can be.
When PHP is fast (and it often is!), it's because the functions you're using are written in hand-tuned C. The kind of "modern PHP" that I write professionally (think Java or C# without types or a compiler) is often disappointing performance-wise.
HHVM is slowly proving to the word that this is not due to PHP itself but to the Zend runtime, but it'll be a while before HHVM takes over.
I don't buy the whole "slow" thing. I work on a very popular SaaS web app, written in PHP, that is running on far fewer frontend web servers than I've seen running other sites with fewer users written in other languages.
With an Opcode cache (available shipped since 5.5) it's perfectly fine performance wise.
When PHP is fast (and it often is!), it's because the functions you're using are written in hand-tuned C. The kind of "modern PHP" that I write professionally (think Java or C# without types or a compiler) is often disappointing performance-wise.
HHVM is slowly proving to the word that this is not due to PHP itself but to the Zend runtime, but it'll be a while before HHVM takes over.