I'm building a Java based HTTP Server with a plugin system. And I'm trying to find a simple and elegant way to load PHP as a Template Engine plugin. preferably something that also requires very steps for users that install the plugin, for example pointing to the php directory and the plugin does the rest. However, Google is not proving to be very helpful (it doesn't matter what keywords I use the results are rather useless).
I've found several things about a java-php-bridge, which seems like it could work but it's a rather large old (java 1.4 support) library and I've got a feeling that there is a simpler dedicated solution.
I want to be able to push a map with variables to PHP (headers, get vars, custom vars, etc.) and retrieve the parsed PHP back (including headers that have been set and other possible output)
and, if possible, I want to do this with the least possible computing time (e.g. I could call php.exe every time, but if I'm correct that's a rather expensive way to handle it)