I ran across this article talking about PHP vs Java and in particular, how WASP addresses the issues with PHP. It points out some of the negative and positive aspects for both languages. I agree with most points in the article. I have written websites that used PHP for the dynamic pages and the more complex they got, the harder it was to maintain. I know of one scripting language framework that addressed most of these issues early and maybe that is why they have gained so much momentum (and others are copying it).
Languages Scripting vs Java