Greetings all,
Well it's not about if PHP is better than Java or viceversa, it is acually a manner of doing the things for each present situation. There are certain things php can do that Java don't, and also other things that Java can and PHP can't.
The reason for such popularity of the PHP is because it has a well known reputation among webmasters, there are more open source projects with PHP in mind, and because is a free resource used in many platforms.
Java in the other hand, has more popularity among business software developers, creating software specially for businesses & enterprises, making it hard to find really good scripts & software for free, but in general I think you should know what Java can do, and how can you be benefit from such a great programming language.
***NOTE:Sorry for my poor english, but as you have noticed, I'm not a native english speaker nor writer, I am from Mexico. Thank you for your time =)