Is there a PHP implementation that targets the JVM (akin to JRuby and Jython)?
How can I run PHP on JVM (akin to Jython and JRuby)? I am aware of the following:
Quercus, which appears to be dead alive and well.
webSphere sMash, that appears to have no documenta开发者_运维技巧tion been shutdown
Is there a more mature project for this?
AFAIK, quercus and P8 are the only two PHP compilers for the JVM, and you already ruled both of them out.
Although I think you are a little bit too harsh: Quercus had its latest release just 23 days ago. Calling it "dead" seems a little premature. And why do you need documentation for P8? The whole point is that it's just PHP. All the documentation you need is right there on PHP.Net.
Another PHP compiler for JVM has born recently: https://github.com/dim-s/jphp
As author says:
Goals
JPHP is not a replacement for the Zend PHP engine or Facebook HHVM. We don't plan to implement the zend runtime libraries (e.g. Curl, PRCE, etc.) for JPHP. Our project started October 2013. There was a few reasons for that:
- Ability to use java libraries in PHP
- Upgrading performance via JIT and JVM
- Replacing the ugly runtime library of Zend PHP with a better runtime library.
- Using the PHP language not only on the web
- Also: unicode for strings and threads
精彩评论