I wouldn't say that anyone has the impression that "all PHP programmers are stupid." Rather, it's more that PHP, on top of attracting O(N) competent developers like any other language, also attracts O(k >> N) marginal developers who barely know enough to get off the ground, and couldn't really manage to code in any other language. When you randomly select a "representative" PHP coder (such as by listing "knows PHP" as a criterion for resume submissions), you get a marginal one.