Despite of all the bad-mouthing that PHP gets, i personally think that PHP is super awesome. There might be a few issues in the documentation, some methods/functions that are completely useless, etc. But it surely is awesome.
The reason why I think that non-PHP developers think PHP sucks is because of the stupid spaghetti code that they see everywhere. And that is the mistake of some dumb-ass PHP developers who neither use any concepts of OOP nor follow any particular architecture. It’s just plain old PHP that has a lot of files and lots of include or require statements.
See, this is fine if you are doing a small form submission. But if you are building a huge Portal, the you MUST use the OO Programing atleast!
Not many developers use it.
If you are not very familiar with the OO concepts, the go and learn it! And more than that, there are many super-awesome frameworks that help you write better well-structured, object oriented code.