Let me add my 2 cents.
PHP hosting is cheaper than Java hosting for small / medium sized applications. For larger applications, if you want to switch to cloud or VPS hosting solutions, I think there will be no difference, because in this type of hosting you pay for resources, not for specific hosting.
EJBs are absolutely unnecessary for Java web applications. You have zillions of another way to develop web applications in Java: struts , Spring , etc.
I do not think that there are any technical difficulties when deploying applications in Java or PHP. It will be more difficult, of course, to find a team of skilled and motivated developers.
gabuzo
source share