PHP is not a language for everyone. I've seen some pretty crappy code in my time using it. A lot of people say it's so easy to use (yet they code without a proper coding flow).

Anyone can code in PHP, however, not everyone can program with it.

That being said. Using it right, you can code just about anything with it. I'm a fan of OO-PHP. I don't get why some people are so against it. I can code very clean efficient applications with it (some of which are highly scalable).

Noting a few examples as to why you think PHP sucks is well within your right. Remember that no longer is perfect. But I do find that PHP regularly meets my needs.

PS: I know quite a few apps which have been writing in PHP (facebook, Wordpress to name a few)

There's gotta be a reason for it. It might suck in certain areas (name a language which has no issues?) but overall it's pretty damn good.