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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Facebook Porting PHP To JVM

44 点作者 code-dog将近 13 年前

12 条评论

kingkilr将近 13 年前
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.
评论 #4374060 未加载
评论 #4374055 未加载
评论 #4374231 未加载
abolibibelot将近 13 年前
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...)
nickmain将近 13 年前
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>
评论 #4374240 未加载
scottmac将近 13 年前
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>
jacques_chester将近 13 年前
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.
评论 #4374253 未加载
stephen_mcd将近 13 年前
It's the summer of 2018. Facebook shares drop to 17 cents as their PHP to ASM compiler project nears completion.
评论 #4373707 未加载
lukev将近 13 年前
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?
评论 #4373972 未加载
评论 #4373911 未加载
评论 #4373935 未加载
prezjordan将近 13 年前
Why do these companies like the JVM so much? Twitter, and now Facebook. Does it have that great of performance?
评论 #4374050 未加载
评论 #4373978 未加载
评论 #4373952 未加载
hdoan741将近 13 年前
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.
评论 #4374027 未加载
krob将近 13 年前
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.
maratd将近 13 年前
&#62; Facebook are looking to move PHP on.<p>Did Google Translate write the article?
dreamdu5t将近 13 年前
This is all great but... why?
评论 #4374207 未加载
评论 #4373899 未加载