Outside of your average copy/paste stack overflow Wordpress dev, most PHP programmers are very aware of it's flaws, and would probably welcome the chance to move on.
However, the frustrating thing about the prevailing attitude is that creates a stereotype that all PHP developers are incompetent, and this stops PHP devs moving on. I've been trying for the better part of a decade to move out of PHP as my main language. I have github projects in various other languages, submitted patches to open source projects, but the above attitude means that outside of existing PHP shops, no one is interested in hiring me.
I've literally had one potential job tell me that they liked my python code assignment, but they had a policy of not hiring PHP programmers. It was not an isolated incident.
Given those attitudes, are you surprised PHP devs bitterly defend the language?