Firstly, every time I see it getting slammed its nearly ALWAYS PHP in comparison to a framework whether it's rails, django, web2py or whatever. As soon as I see this I can't help but feel the author is just jumping on the "PHP isn't cool bandwagon". PHP isn't a framework, so don't compare it to other frameworks.
Secondly, it is possible to write good code using PHP - and many people do. It powers some of the largest sites in the world and there are more PHP web devs out there than any other working on millions of PHP sites. There are also some excellent frameworks for PHP that are quick to learn, fast and powerful. Codegintier, Yii or Symphony(2) all spring to mind.
Finally, for most web developers who actually need to earn a living writing code to solve problems, PHP is still the most popular choice for good reason. It's easy to earn, easy to deploy, cheap to host and widely used. There are also more PHP jobs (especially in the U.K.) than any other and it isn't changing anytime soon. For the busy developer trying to make a living these type of posts aren't really helpful at best and at worst quite insulting.