I believe PHP is a progression of C++, that said C++ and Java are very similar in coding style. Also C++ uses a whole lot of the same function names as PHP, which stems from the original C libraries.
Java is very portable but, mmm very slow, C++ beats it hands down, hence why the majority of games are written in C++.
As Requinix say's,it depends on what you want to do. If you're writing system programs, drivers, serious number cruncher's, simulators etc then it's C++ all the way. On the other hand if you want to write something once and quickly then Java is your bag, it's more akin to a bag of tricks. This bag of tricks is very adaptable and is being used for some very adaptable applications.
From having a look at the job market recently, there seems to be a whole lot more C# job adverts than Java, in my area!?