TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

PHP compiler for JVM

115 点作者 tjomk大约 11 年前

8 条评论

hapless大约 11 年前
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_s大约 11 年前
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>
lawl大约 11 年前
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 未加载
zippie大约 11 年前
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.
srisa大约 11 年前
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.
bascule大约 11 年前
Does this use InvokeDynamic?
评论 #7455462 未加载
chops大约 11 年前
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 未加载
elwell大约 11 年前
Why JVM when you have HHVM?
评论 #7455782 未加载
评论 #7456098 未加载