The php/Java bridge is an optimized, XML-based network protocol, which can be used to connect a native script engine, PHP, with a Java or ECMA 335 virtual machine. It is more than 50 times faster than local RPC via SOAP, requires less resources on the web-server side, and it is faster and more reliable than direct communication via the Java Native Interface.
Java and PHP don’t play well together whatever you do. This is the last resort if you HAVE to make them talk