That said, for your question if PHP is always faster than Java, the answer is depends. Any comparison between two distinct languages will probably have this answer.
See that your simple test leaves out many things that can directly interfere with the result. The fact that you compared a web application (php running on Apache) with a "standalone" program (Java running directly on jre) and with a C program (compiled, and therefore "naturally" faster). You would have to, at the very least, be comparing JSP running on Tomcat (which is the web face of Java) with PHP to have a test that starts "roughly equivalent".
And that's just the beginning, but I will not go into trouble with your test method. Remember that all of these languages apply optimizations that can make a lot of difference in certain scenarios.
I'll focus on your question of which language is most appropriate, and the answer again is: it depends. I'll assume we're talking about web apps (php, jsp, apache, tomcat).
The question that remains is: why do you need a system that responds so quickly? Why is speed the most important factor for you, at the expense of safety, reliability, robustness, ease of maintenance? A large portion of web applications and websites (99% percent would say, but I have no respect respect) do not need to respond quickly as desktop applications respond, even more if we consider the variation in quality and speed of networks (Broadband, 3G, Fiber).
If you have equivalent knowledge of Java and PHP, then I simply suggest you use both. Nothing prevents you from working with two different languages, especially if you are a freelancer. At the time you do the project analysis, you can decide, based on the scope, what you are going to use. The good thing is that you will always be "training" each of them, which can be useful when any project or job requires any of them specifically.
The biggest though, as far as I know, is a higher consumption of processing and memory in the case of Java (especially if it is web), which makes hosting with Java more expensive, but otherwise I would say that both are equivalent in capabilities and capabilities (considering, of course, differences in syntax, structure, and deployment).
Finally, choose the one that feels good (or both) and be happy. And, when you want, change.