In this post to his site J-P Stacy suggests that its neither the developers or the language that's the real problem with PHP. He wants to get beyond the typical anti- and pro-PHP rants and look at what makes for good web applications, specifically PHP ones.
I think there's a sense in which PHP's success - widespread and inclusive - is at the very same time its failure - quickly learned and nonselecting. Communities like PHP's can evolve in the same way as any other population evolves: individuals exhibit random traits; a particular environment translates those traits into a likelihood of longevity; over time, individuals or their descendants exhibit different traits, adapted to suit the environment. But if the environment is not particularly harsh, then very little selection occurs. Only a negative evolutionary pressure, a harsh environment, can if you like weed out a lack of developer talent.
[...] There's no escape. We must live with the likelihood that untalented developers can end up building charmless applications, and a (unfairly large) proportion of those will be PHP applications.
He does make one suggestion that could help the community and those developers new to the language and in need of training - good management (or, as he describes it, "direction"). He suggests three areas that could be managed to help make the PHP ecosystem better as a whole - the people, the processes for making good software and the embracing of standards known for success.