PHP is a scripting language, not just sort of.

PHP is not necessarily less powerful than Java.
The main advantage of Java is it is compiled and strongly typed. That means a few things. It is compiled, so it is fast and you will know about many kinds of problems in your code before you ever run it. Also you are more certain what type of an object you have a reference to. These things increase your confidence in the code you write, making Java nice for enterprise applications where fewer bugs and stability are most important. Also the development tools for Java are very powerful (Eclipse, NetBeans).
The downside to Java is it is not a terribly expressive language. It often requires quite a bit of code to express what you need it to do. Many scripting languages give you syntactic shortcuts to allow you to express things concisely. Eg, there are some Java vs Pnuts comparisons here...
http://pnuts.org/articles/pnutsHighlights.html
Java is neat because it is made up of multiple parts. One part is Java-the-language, this is the Java code you write. Another part is Java-the-virtual-machine (aka JVM). Java-the-language compiles into byte codes, which the JVM executes. Because the language is decoupled from the JVM, you can write Pnuts scripts (for example) and then compile your Pnuts scripts into byte codes and execute them on the JVM. Java-the-language, Pnuts, and others that compile to bytecodes are known as JVM languages.
</thread hijacking>
