Java is cleaner to write than PHP since it's 100% Object Oriented language and it supports MVC(Model View Controller) However, Java is complicated and you need a lot of libraries like struts(framework), hibernate, etc.. to do basic stuff.
Java/J2EE is very good for solving integration problems specially when you need to integrate legacy and ERP systems.
Java is fully adapted in the enterprise because it's supported by IBM, SUN, Oracle, BEA, ..
PHP is less clean, but it's very easy to learn and to develop applications with. It's very fast too.
One of the reasons if not the biggest reason for PHP's take off is more or less that it is opensource. So any of the linux and opensource people are going to use it just for that reason. The opensource people dislike the cooperate ran programming languages (such as JSP and ASP.Net).
You can get up-to-speed much quicker with PHP. Though, when it comes time to build large, maintainable, secure, scalable applications, moving to J2EE will be a better choice.
1- Java harder to master than php or asp: on a learning stage, of course. 2- Php/Java: can be installed in any architecture. Asp generally locked in Windows 3- Java: heavily object oriented, Php: OOP is rather new. 4- Sponsors behind java (sun) and asp (ms) bigger than the one behind php (zend). I think this count: asp is major player because ms is behind it. If you want a developer paid job it'll be easier with java/asp. Corporations tend to consider important the possible support they gonna get and heavy names are important when they're choosing technologies. 5- Documentation support: more support on asp.net / java than php.