HHVM Blog

hhvm.com · Company blog · on HN since 2013

The official blog of HHVM, Facebook's virtual machine for running Hack, which began as a fast PHP runtime.

What HN saysHN commenters point to it as a way to use Hack or run PHP, and note that PHP support ended after the 3.30 release series.
80HN people shared it
48linked it in comments
58stories submitted
2.1Kstory points
2 years agolast shared
2013people per year2026

Most-shared posts

  1. 1
  2. 2
    Ending PHP Support, and the Future of Hack
    7 people · 435 points · first shared 2018 · 264 comments on HN
  3. 3
    HipHop VM: now at 98.5% PHP framework parity, 16% faster
    5 people · 154 points · first shared 2013 · 103 comments on HN
  4. 4
  5. 5
    The Future of HHVM
    4 people · 265 points · first shared 2017 · 158 comments on HN
  6. 6
    Faster and Cheaper: The Evolution of the hhvm JIT
    4 people · 11 points · first shared 2013 · 2 comments on HN
  7. 7
    Wikipedia on HHVM
    3 people · 193 points · first shared 2015 · 56 comments on HN
  8. 8
    HHVM 4.0.0
    3 people · 32 points · first shared 2019 · 19 comments on HN
  9. 9
    Frameworks
    3 people · first shared 2014
  10. 10
    LLVM Code Generation in HHVM
    2 people · 109 points · first shared 2015 · 16 comments on HN
  11. 11
    HHVM is fast – too bad it doesn’t run my code
    2 people · 69 points · first shared 2013 · 59 comments on HN
  12. 12
    Lockdown Results and HHVM Performance
    2 people · 15 points · first shared 2015 · discussion on HN
  13. 13
    PHP7 now supported by Facebook's HHVM
    2 people · 13 points · first shared 2015 · 1 comments on HN
  14. 14
    HHVM Long-Term Support Version 3.15 Released
    2 people · 4 points · first shared 2016 · 1 comments on HN
  15. 15
    Async – Cooperative Multitasking for Hack
    2 people · 3 points · first shared 2014 · 1 comments on HN

What HN people wrote when they linked it

throwaway888abc · 2024-10-18
>Organized Library PHP's massive library (2,000+ functions) is curated and organized into modules & classes. // PHP in_array('needle', $hayStack) // THT $hayStack.contains('needle') This looks more or less like a new language ? It must be amazing amount of time and energy to rewrite PHP in to this. I don't see the benefits. I understand the Facebook's HHVM had some. (https://hhvm.com/) Or Swoole (https://openswoole.com/) has it. But i'm not clear of THT (also typical apple vs oranges benchamrkTM included). 2cents
nkcmr · 2018-02-04
just use [hack](https://hhvm.com/). hack has language-level support for async tasks[^1]. and is 99% compatible with PHP. On the other hand, I would love to see PHP8 bring language-level support for async tasks. [^1]: https://docs.hhvm.com/hack/async/introduction
notduncansmith · 2014-05-11
Facebook seems to be having a fair amount of success using the HipHop VM (http://hhvm.com). Seems to have support for most of the PHP frameworks I've heard are worth using recently. Just curious, why the move to PHP? I've been having wild fun with Node.js and Golang.
jcrites · 2021-04-30
If you ever need to work with PHP, use PHP/Hack developed by Facebook: https://hacklang.org/ It's a compiled language built partially in Rust, being rewritten entirely in Rust, JIT compiled using HHVM: https://hhvm.com/ I don't believe it's compatible with existing PHP codebases, but you could probably convert one over, catching safety issues while you did it. Hack a modern and highly productive language that's in many ways as nearly sophisticated as Rust. (How many other languages have both opaque and transparent type aliases, for example? https://docs.hhvm.com/hack/types/type-aliases ). It has a mature async/await system, for another example. One feature it's missing is the macro system that Rust has, though.
throwaway40324 · 2019-11-28
Right, but up until after Hackv3.3, PHP code was supported, which support ended 9 days ago. "HHVM v3.30 will be the last release series where HHVM aims to support PHP. The key dates are... 2019-11-19: expected end of support for v3.30" https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.htm… Note: I really dont believe my above speculation is related, just thought it was an interesting coincidence, at best.
yellowapple · 2019-03-14
The transpiler is HipHop. They discontinued that in favor of HHVM, which does JIT compilation instead. More info: https://hhvm.com/ EDIT: apparently, though, HHVM stopped supporting PHP itself last month; now it only supports Hack. I'm not familiar enough with Hack to know how much it actually deviates from / improves upon PHP.
nodesocket · 2017-06-04
No, PHP is actually really fast. Especially HHVM[1] which is crazy fast. [1] - http://hhvm.com
jacquesm · 2017-02-28
They use something called HHVM, which is a PHP compiler. http://hhvm.com/
pjmlp · 2017-01-12
> PHP's is non-JITed too! It depends on which PHP you mean. http://hhvm.com/ http://react-etc.net/entry/php-8-to-ship-with-a-jit-compiler
mahyarm · 2016-07-16
Sorry that was a typo. I meant HHVM and Hack http://hhvm.com/
Tehnix · 2014-11-12
Actually, for a large codebase written in a dynamic language, introducing gradual typing to slowly convert all the dynamic code, into more stable statically type code, can be a quite nice approach (compared to rewriting the whole codebase). Take for example Facebook and their HHVM[0]. They can run the existing code, and then slowly update the code with types, and write new code with types. The alternative would be years and years of rewriting the whole codebase. Personally though, I'm more a fan of the type-checking done in languages like Haskell, F# and ML. [0] http://hhvm.com
vderas · 2014-10-02
I'm not sure if this was added to the article after your reply, but the author mentions Hack specifically, along with some caveats about it's adoption, namely that it is currently unkown how widespread Hack will be and how you're basically at Facebook's mercy in regards to the future of the language. As for adoption, the only stat that I could find was adoption for HHVM[1] (a virtual machine for executing Hack and PHP[2]), but since they list Wikipedia among the HHVM adopters, I'm pretty sure this does not equate to adoption of Hack itself. [1]:https://github.com/facebook/hhvm/wiki/Users [2]:http://hhvm.com/
RossM · 2014-01-22
It's an alternative PHP runtime. It no longer compiles PHP to C++ (it's predecessor hphpc), instead it uses a JIT compiler which gives it better performance over standard PHP, without requiring a compilation step. It's mostly compatible with the standard PHP syntax/stdlib. It offers an alternative syntax that allows you to give return types of functions, which can give you further speed improvements. There's also a few additional features (for example, it supports similar hinting to the recent ArrayOf RFC). It's worth checking out, but probably not worth using in production yet - they're working on getting the top 20 frameworks to pass their unit tests in HHVM[0], so there's a good chance your existing apps will run. [0]: http://www.hhvm.com/blog/2813/we-are-the-98-5-and-the-16
frik · 2013-12-18
Do you have a blog, or do you intend to put it on Github? A PHP parser written in PHP that generates bytecode for LuaJIT or HHVM's JIT-runtime would be cool. I was thinking about this too. And it would be fun to hack around :) FB's HHVM JIT and its bytecode format "hhir" is explained is the following recent blog post: http://www.hhvm.com/blog/2027/faster-and-cheaper-the-evolution-of-the-… LuaJIT2 and DynASM: http://luajit.org/ [edit:] I found your repo: https://github.com/cretz/meh ...interesting, I am reading the code atm
MrQuincle · 2017-06-24
This article is interesting, not just because it's applied on a practical problem at Facebook, but also because it's quite fun to read the theory itself. 1. A Bayesian approach for A/B testing is advocated where noise is handled properly (not through heuristics). 2. Computationally efficiency is addressed through quasi-Monte Carlo. 3. It's practical use is shown through a production ranking system and optimization of a web server. + The Expected Improvement acquisition function (Mockus, 1978, Jones, 1998) is used to perform Bayesian optimization of the hyperparameters of a particular model. + Intuitively, it is an iterative procedure that picks a new point to fit a function in a sequential manner using the previously picked points. + Aside, to play with Gaussian processes, see e.g. https://github.com/fmfn/BayesianOptimization. To summarize, rather than searching for random variables it's searching for random functions. + Aside, Bayesian optimization is interesting because it reduces the number of evaluations required and replaces it by assumptions in the form of a (Gaussian Process) prior. See article http://papers.nips.cc/paper/4522-practical-bayesian-optimization-of-ma… by Snoek et al where by the way duration of execution time is also taken into consideration. + Aside, Bayesian optimization (in this form) does not use derivatives. + Aside, rather than ordinary MCMC, the "fit" of the posterior distribution is used to inform the…
nikic · 2016-11-11
We tried to implement an LLVM based JIT compiler for PHP. There's basically two problems: First, LLVM is excruciatingly slow. If I remember correctly, it took more than a minute to compile all the WP functions for a front-page access (this is something like 100k VM instructions translated to LLVM bitcode). Second, LLVM is not great at optimizing the kind of IR that a JIT compiler for a dynamic language emits. It is much more important to perform language-specific optimizations prior to lowering. HHVM basically came to the same conclusion [1]. They lowered vasm to LLVM IR and let LLVM perform additional optimizations and native codegen. The difference was basically noise. On the other hand, there are projects that do successfully use LLVM for JIT. We now experiment with dynasm, which doesn't optimize, but is fast and much more pleasant to use. libjit looks like another popular option. [1]: http://hhvm.com/blog/10205/llvm-code-generation-in-hhvm
acrooks · 2014-04-17
http://hhvm.com/ seems to work pretty well for Facebook.
dcgudeman · 2023-08-26
I noticed that the hack blog (https://hhvm.com/blog/) basically stopped posting updates since the end of 2022. As downstream users of hacklang development have you folks noticed a change in development pace or ambition within the hack development team?
slama · 2021-10-27
HHVM is open source and seeing active development with weekly releases: https://hhvm.com/blog/ My understanding is they're waiting on the language stabilizing before making a push to open it up to the broader software engineering community. They're still heavily invested in Hack and releasing research papers like https://engineering.fb.com/2021/03/03/developer-tools/hhvm-jump-start/… Migrating to another language without an incremental adoption path likely isn't feasible for them
jbboehr · 2021-10-27
They stopped supporting interoperability a while ago [0]. [0]: https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.htm…
plorkyeran · 2020-10-31
Facebook's been using Hack for close to a decade now. Hack still strongly resembles PHP, but it's taken a different direction from PHP 7 and HHVM is no longer intending to be an alternative PHP runtime (https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html).
tyingq · 2020-08-30
Hack/HHVM no longer has a goal to be PHP compatible, but it looks pretty much the same. It does have a JIT: https://hhvm.com/blog/2027/faster-and-cheaper-the-evolution-of-the-hhv…
nym3r0s · 2020-08-30
judge2020 · 2019-11-09
Just to add (you didn't say otherwise), PHP on HHVM is EoL'd https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.htm…
botto · 2019-09-08
True, they use hacklang but it's no longer folowing the php spec https://hhvm.com/blog/2019/02/11/hhvm-4.0.0.html
simcop2387 · 2019-04-23
HipHop turned into HHVM, which as of Feb no longer supports PHP going forward. https://hhvm.com/blog/2019/02/11/hhvm-4.0.0.html
duskwuff · 2019-04-01
Nope! As of last year, HHVM no longer targets PHP [1]; instead, it targets a Facebook-specific variant of PHP called "Hack". It will still run some PHP code, but that's on its way out. Even better/worse, PHP 7.2 with an opcode cache can actually outperform HHVM on many practical benchmarks [2], and 7.3 is faster still. [1]: https://hhvm.com/blog/2018/09/12/end-of-php-support-future-of-hack.htm… [2]: http://web.archive.org/web/20180305000053/https://kinsta.com/blog/php-…
Operyl · 2018-11-27
HHVM can't make its way entirely back to core, and is in fact completely separating from PHP entirely now[1]. If I recall correctly, while PHP7 implemented better op-caching, it has _not_ implemented JIT compilation yet. 1. https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html
mintplant · 2017-10-17
On the other hand, Wikipedia is going to have to migrate back off of HHVM now that Facebook is planning to break compatibility with PHP and focus totally on Hack [0]. So hopping on board someone else's solution can bite you if their priorities change. [0] http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close