Four reasons...

Why you would choose PHP over Java on your next major CMS development project:

  1. You want to write anywhere, run once.
  2. You want to work directly with classes, not with masochistic binding frameworks and scaffolding tools.
  3. You want to install open source libraries without a complex build process.
  4. PHP is the ultimate template engine.

Why you would choose Java over PHP:

  1. You don't want the whole application server to reload itself for every web request.
  2. You want namespaces and built in methods that aren't some randomly invented C syntax.
  3. You believe a domain model is more than a bunch of MySql wrapper classes.
  4. Nothing in PHP comes close to Hibernate.

Why you would choose neither Java nor PHP:

  1. You actually want to let Apache do the work it's best suited for (see Zope).
  2. You think that implementing a simple dynamic application shouldn't require hundreds of lines of accessor methods (see Rails).
  3. Who needs an application server anyway? (see Trimpath).
  4. Visual Studio is just far too convenient (see .NET).