First, lets note that you're on a java forum so any answer you get is going to be utterly biased
However, having used both of them:
PHP doesn't make it easy to write good robust, maintainable software. As with any language its possible for a competent developer to use it in a careful manner. Java on the other hand gentley guides you towards writing good software.
Java Servlet support isn't as easy as PHP to setup. PHP is tailored directly towards web page generation (from whatever source) and so is very good at it.
In my opinion, it depends on how complex you see your game getting. The more complex the problem/solution/game, the closer you reach towards enterprise tools, which pushes you close to Java.
Java and PHP are both easy enough to pick up and use. There is alot of support for both both commercial and on friendly forums like this one.