In my opinion, there is no comparison between PHP and JAVA on Web Platform.
Gone are the days them PHP was called Personal Home Page and was only used for small websites. Today PHP is for both small and enterprise level applications. I am sure you must have heard about facebook.com and myheritage.com ??
Also, when you have backing of Oracle, Microsoft, IBM and SUN (please note Sun also funds JAVA) then I don't need to tell you how effective, scalable, fast and easy is PHP.
I think that, "building a web application in Java is like killing a housefly by a Bazooka." I am not saying it can not be done, all I am saying is just look at the time, cost and resources required to do that.
Here are few links to back my point: