At this point I have to just laugh. They literally already paid for the development of a prototype for a faster PHP, and decided not to pursue that route: <a href="http://morepypy.blogspot.com/2012/07/hello-everyone.html" rel="nofollow">http://morepypy.blogspot.com/2012/07/hello-everyone.html</a>. I have to assume they have some insane internal politics, because there's no sane technical reason to develop HipHop (static subset-of-php to C++ compiler), then start the HipHop VM, then fund the PHP on PyPy prototype, and now apparently move to a PHP on the JVM.
Phalanger ( <a href="http://phalanger.codeplex.com/" rel="nofollow">http://phalanger.codeplex.com/</a> ) is an implementation of PHP running on the CLR with a fairly good compatibility story and sometimes much better performance.<p>Phalanger worked well even without using the DLR (dynamic language runtime) so a JVM implementation shouldn't be a massive undertaking (except for the lexer and parser parts...)
There are already at least 2 implementations of PHP on the JVM:<p><a href="http://quercus.caucho.com/" rel="nofollow">http://quercus.caucho.com/</a>
<a href="http://www.projectzero.org/php/" rel="nofollow">http://www.projectzero.org/php/</a>
I work at Facebook and have been involved in the Hiphop for PHP project for the past few years.<p>We have our own VM written and it isn't based on the JVM.<p>Bytecode:
<a href="https://github.com/facebook/hiphop-php/blob/master/doc/bytecode.specification" rel="nofollow">https://github.com/facebook/hiphop-php/blob/master/doc/bytec...</a><p>Code:
<a href="https://github.com/facebook/hiphop-php/tree/master/src/runtime/vm" rel="nofollow">https://github.com/facebook/hiphop-php/tree/master/src/runti...</a>
It should be noted that there is <i>no direct evidence that this is happening</i>, other than:<p>"The presence of Facebook engineers at the Java Language Summit in San-Francisco"<p>Is the author aware that Facebook is a multi-language shop? It's why they have Thrift, after all.
I guess someone must <i>really</i> love PHP, though I'm slightly confused as to why.<p>If you're going to make such a massive undertaking anyway (it's not just the new runtime, all existing code will have to be re-tested and re-debugged), why not sink the man-hours into putting it into a new language better suited to the task from the start?
Is there any official reference to backup the claim? I doubt Facebook would spend effort on doing this since they have already port PHP to C++ with Hiphop.
Lets ask this one question. Why rewrite python in python? Why rewrite Ruby with java? They may have realized that php is a good solution for their existing framework, the framework has an enormous unit test harness, which would take a very long time to translate, and they have nothing against the language at the company. If they are planning a jvm for php, it is probably because they have developers there who have experienced the speed increase of other jvm langauges like jruby, jthon, etc. I'd wager money that they will probably use one of the current open source translations and build on top of that, maybe gut it like crazy and use it as a foundation. A full rewrite if php in jvm would probably be extremely difficult timewise.