I recently ran into this problem. The Resin solution above is actually a complete rewrite of PHP in Java along the lines of JRuby, Jython, and Rhino. It is called Quercus. But I guess for you as well as for me, and uploading Apache / PHP settings is actually not an option.
And besides Quercus, there are other problems: the free version is the GPL, which is difficult if you are developing commercial software (although not as difficult as Resin would like you to believe (but IANAL)), and in addition to this, the free version does not support compilation into byte code, so its mostly interpreter is written in Java.
In the end, I decided that I just needed to exchange simple messages over HTTP. I used PHP json_encode() / json_decode() and Java json-lib to encode messages in JSON (simple, text, good match for data model).
Another interesting and easy option would be to force Java to generate PHP code and then use the PHP include () directive to retrieve this via HTTP and execute it. I have not tried this though.
If its actual HTTP calls you are concerned about (for performance), none of these solutions will help. All I can say is that I had no problems with PHP and Java on the same local network. I feel this will not be a problem for the vast majority of applications if you keep your RPC calls pretty clear (which you really need to do anyway).
Ramon
source share