JavaScript is a horrible language. The fact that a lot of good software is written in JavaScript because there is no good alternative in the browser does not make it any less a horrible language.
The problem with PHP is that it is a horrible language and there are plenty of better options in its niche. Those two factors combine to make PHP a nonstarter for programmers who are familiar with the other options.
I dispute that there is any good software written in Perl.