I mention Wordpress only as great example of "getting this done" approach of PHP. Never did i mention it as example of "high quality PHP code".
phpBB and Drupal have their problems, but they both improved their code-base alot, moving from legacy PHP software to software that is much more maintainable. The road to "high quality software" is long, but throwing software out of the window instead of slowly improving it is not the right solution either.
Both projects have high numbers of unit-tests and can guarantee backwards compatibility and regression free releases in a much better way than most of the software out there in any company, written in any language.