
Do you want some full web programming or some programming language that can be used also for web and PC? What kind of secure do you want to use and how fast do you want to load the page?
With PHP a web developer can simply just make some text files with a .php ending, he / she mixes them and include HTML into it. The web developer can easily call other files and publishing the code is even easier. The developer can buy php website hosting from basically everyone. For the programmer Java isn’t exactly complicated and the programming language even had .jsp pages which were quite similar to .php or .asp.
For web development I believe PHP is better than Java and I have been using it a lot lately. For PC application Javascript is a good solution. It's not quit Java but it's good enough.