TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHP compiler for JVM

115 pointsby tjomkabout 11 years ago

8 comments

haplessabout 11 years ago
This is not the first attempt. This seems to be focused on extending PHP&#x27;s performance and capabilities. Personally, I&#x27;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:&#x2F;&#x2F;www.caucho.com&#x2F;resin-3.1&#x2F;doc&#x2F;quercus.xtp</a><p>The PHP-to-Scala migration helper uses Resin&#x2F;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:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;php-to-scala-migration-helper&#x2F;</a>
评论 #7455255 未加载
评论 #7455018 未加载
评论 #7454781 未加载
评论 #7455930 未加载
j_sabout 11 years ago
See also: <a href="http://www.php-compiler.net/" rel="nofollow">http:&#x2F;&#x2F;www.php-compiler.net&#x2F;</a><p><pre><code> &gt; Phalanger – full-featured PHP runtime &amp; compiler for .NET&#x2F;Mono &gt; frameworks. Phalanger is modern open-source implementation of PHP, &gt; compatible with the vast array of existing PHP code</code></pre>
lawlabout 11 years ago
It&#x27;s nice to see some progress on the PHP Front, with this and HHVM. Though I&#x27;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&#x27;d have to write an actual spec and declase theirs as &quot;just&quot; the reference implementation or something.
评论 #7455903 未加载
zippieabout 11 years ago
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:&#x2F;&#x2F;llvm.org&#x2F;devmtg&#x2F;2008-08&#x2F;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.
srisaabout 11 years ago
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&#x27;t know anything about language design or compiling something for JVM.
basculeabout 11 years ago
Does this use InvokeDynamic?
评论 #7455462 未加载
chopsabout 11 years ago
How about a PHP interpreter for erlang?<p><a href="https://github.com/altenwald/ephp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;altenwald&#x2F;ephp</a>
评论 #7476415 未加载
elwellabout 11 years ago
Why JVM when you have HHVM?
评论 #7455782 未加载
评论 #7456098 未加载