However, I think that poor programmers will write more ugly code in PHP than in python/django for instance.
So, if you compare the overall quality, PHP loses.
Also, it seems that these days, great programmers use clojure/python/ruby/arc instead of PHP.. so that doesn't help PHP quality ratio (As poor programmer using PHP will continue to use PHP since they would never ever be willing to learn a new language).
I've recently worked with the most ugly code of my life. 1000 lines function, bad indentation, 8 levels of if/foreach, wrong OO, lots of repitition, etc. Guess what, it was written in PHP. Does it prove something? No. Does it make me like PHP? Really not.
That being said, I've seen some pretty clean PHP code and I even had some fun with it.