Earlier quoted context omitted.
I'm pretty sure a substantial part of PHP's reputation is the nightmare code produced by PHP developers.
And that goes right into the whole "badly designed language" trope as well. Essentially, anything written in PHP prior to version 5 (and especially prior to version 4) should be considered suspect. I'm a long time PHP developer (well, was until recently - my current position is in the javascript/nodejs stack arena), and have been using it since the v3 days (so not there from the beginning, but close enough). There we…
It's entirely, 100% possible to write good, clean, tested, maintainable code in PHP. But most people working with PHP, for whatever reason (and I'm sure there are many reasons), simply don't bother.
I suppose the same can be said of all languages, but PHP devs are the worst offenders IME.