This is not the first attempt. This seems to be focused on extending PHP's performance and capabilities. Personally, I'm more interested in porting PHP applications away from PHP.<p>Caucho Resin offers 100% php compatibility on the JVM, so that you can host your entire app in a servlet container, and port features one by one.
<a href="http://www.caucho.com/resin-3.1/doc/quercus.xtp" rel="nofollow">http://www.caucho.com/resin-3.1/doc/quercus.xtp</a><p>The PHP-to-Scala migration helper uses Resin/Quercus to provide the standard library to translate PHP to Scala. The output is a Scala codebase, so that you never have to touch the legacy PHP again.
<a href="https://code.google.com/p/php-to-scala-migration-helper/" rel="nofollow">https://code.google.com/p/php-to-scala-migration-helper/</a>
See also: <a href="http://www.php-compiler.net/" rel="nofollow">http://www.php-compiler.net/</a><p><pre><code> > Phalanger – full-featured PHP runtime & compiler for .NET/Mono
> frameworks. Phalanger is modern open-source implementation of PHP,
> compatible with the vast array of existing PHP code</code></pre>
It's nice to see some progress on the PHP Front, with this and HHVM.
Though I'm not really a fan of PHP, it needs to be done, too much PHP code has been written.<p>I think the PHP guys themselves should push a bit more for a new runtime though.
Otherwise they'd have to write an actual spec and declase theirs as "just" the reference implementation or something.
Nuno Lopes attempted this first using LLVM in 2008:<p><a href="http://llvm.org/devmtg/2008-08/Lopes_PHP-JIT-InTwoDays.pdf" rel="nofollow">http://llvm.org/devmtg/2008-08/Lopes_PHP-JIT-InTwoDays.pdf</a><p>I think the cost of the garbage collection involved in a JVM implementation vs LLVM significantly outweigh any immediate perceived benefits, especially when you factor in double reference counting anomalies.
How does this deal with the load-all-discard-all-per-request approach of PHP? With everything in the JVM, does it keep eating up the memory on a per-request basis?<p>I don't know anything about language design or compiling something for JVM.
How about a PHP interpreter for erlang?<p><a href="https://github.com/altenwald/ephp" rel="nofollow">https://github.com/altenwald/ephp</a>