We’re happy to announce that HHVM 3.9.0 is now available. You can try one of our prebuilt packages for Ubuntu and Debian, or build from source.

This release contains a variety of enhancements to the type-checker and runtime, and as always many changes designed to improve performance. Key type-checker changes include a new set of library functions to operate on Shapes, a new type to represent Foo::class strings, and improved reflection for type-constants. Runtime improvements include a new facility for pooling curl handles between requests, and a runtime setting to reclaim memory in the translation cache (TC) from dead translations.

The new TC garbage collection (enabled via hhvm.enable_reusable_tc = true) should prove particularly helpful to anyone experiencing frequent crashes related to out of memory from TC exhaustion. Modifications to source files actively being served are a common source of TC leaks. This is a particularly prevalent pattern in development environments, where this setting will likely be helpful. Support for this feature is still experimental, if you experience crashes with it turned on please open issues on our GitHub repository.

The 3.9 release comprises the internal “Nash”, “Osborne”, and “Park” releases. This release is our third LTS and with it support for 3.3 (our first LTS) is ending. Support for 3.6 will continue for six months (when 3.12 is scheduled to be released), and 3.9 will be supported for 12 months.

Comments


  • hhvm-rocks: I'm almost sure about php developers interest more with performance results, instead of C,C++ library changes. HHVM has proxygen now, why you guys not post more or ANY articles about it? You guys post about Hack language, but again, usually php developers use PHP frameworks.. or MVC architectures, which use $controller = new $class($this->X); , which are dynamic, and Hack has no solution for that. I remember, a year ago I asked about that, and got an answer like; "will be added support for dynamic classes" it's like what fun(); function is doing with dynamic functions. and so on... 1 year has been past, no news... HHVM is good, but I do not think to use it in production, yes, facebook use it, but probably facebook developers know MUCH MORE about HHVM/Hack than us (php developers), and they push TDD before new codes go into servers. Also, why are you guys closing issues at github without any reason? someone posts an issue, issue stays there for a while, and then someone closes it, it's because long-time-no-action. Anyway, I know you guys working hard to improve HHVM, but please we as php developers need more a stable product than "it works" standards. Thanks!
  • NM: When's Windows build coming? Most web devs use Windows not Ubuntu.
  • Fred Emmott: These aren't C/C++ library changes - the library functions for shapes are new functions accessible to hack code to oeprate on shapes, and the new type to represent Foo::class strings provides exactly the $controller = new $class($this->X) functionality you're asking about - $class needs to be a classname where 'Foo' is a superclass or interface with <<__ConsistentConstruct>> (so that we know that $this->X is a valid parameter). As for performance: we've not included more details as the changes were small in this release - the most recent major changes were detailed here: hhvm.com/blog/9293/lockdown-results-and-hhvm-performance. If you could give some example issue numbers that you don't think should have been closed, I can take a look - in general we have enough issues with clear, easy reproduction steps and/or responsive authors that we are never going to look at ones that do not fit into these categories. We aim to ask authors for more information if we need it, but if they don't within two weeks, closing them feels like the honest thing to do as they will never be looked at unless more information is provided.
  • Fred Emmott: an external contributor has a working build, and is in the process of getting pull requests merged; I /hope/ for 3.10, though that's not a commitment. So far it doesn't seem like there's major problems, it's just time-consuming: this effort has already involved well over 100 pull requests, all of which need review and testing.
  • hhvm-rocks: Actually, there are "C/C++ library changes" as usually, because I was not talking about this version's specific changes but as generally.. ``` These aren’t C/C++ library changes – the library functions for shapes are new functions accessible to hack code to oeprate on shapes, and the new type to represent Foo::class strings provides exactly the $controller = new $class($this->X) functionality you’re asking about – $class needs to be a classname where ‘Foo’ is a superclass or interface with <> (so that we know that $this->X is a valid parameter). ``` Sorry, I'm not coding Hack yet. Can give me some examples for $controller = new $class($this->X); ? I understand codes better with examples. ``` the most recent major changes were detailed here: hhvm.com/blog/9293/lockdown-results-and-hhvm-performance. ``` Yeah, thanks and I know, I follow HHVM/Hack. How about proxygen? Does it offer mod_rewrite compatibility/hacks ? Do you have any plans to implement standalone server for static files also? One more question, Fred why are you the only person who answer questions here? I'm glad with it, but I think distributed effort is a better approach :) Thanks for YOUR effort.
  • Fred Emmott: I'll see if I can get someone to give you more details about proxygen; all of our servers (legacy libevent http server and the fastcgi server too) can be configured to serve static files - i'm not sure of the performance implications of that too though. As for a classname, here's an example from my personal stuff - please don't take it as 'best practice', it's just me playing around, but it does show this feature - sorry that there's so many parts to it: https://github.com/fredemmott/hack-router/blob/master/src/URIMap.php Key points: - Tbase is defined to be a URIRoutable on line 7 - lines 22-26 are a bit of a pity. On lines 20 & 21 we check that we're dealing with an instantiable copy of the appropriate class, but the typechecker doesn't understand reflectionclass + filter enough, so the final map is to tell the typechecker that yes, string $name is really a classname and it just needs to trust me on that. Usage: https://github.com/fredemmott/personal-site/blob/master/src/WebController.php is an example Tbase https://github.com/fredemmott/personal-site/blob/master/src/URIMap.php provides a concrete URIMap with the template specified https://github.com/fredemmott/personal-site/blob/master/src/Site.php#L23 shows the safe 'new $class' - this is safe because $class is a classname, and https://github.com/fredemmott/personal-site/blob/master/src/WebController.php has <__ConsistentConstruct>, so all subclasses must have a constructor that takes the same kind of parameters As for why they're mostly me: just a matter of who checks for comments how often. I tend to do it more frequently, so there's a higher chance of me being the person who replies. Edit: fixing up after wordpress decided that user attributes and generics were XSS attacks and removed them...
  • hhvm-rocks: Thanks Fred! "I’ll see if I can get someone to give you more details about proxygen" yeah, that would be nice :)
  • HHvA: Any news regarding availability of HHVM for Mac OS X (natively not in a Linux container). HHVM is our standard production runtime including Symfony2, Magento and Wordpress websites and services - thumbs up to you guys!
  • Alan Frindell: @hhvm-rocks: I work on proxygen. It's probably best to open issues and discuss features over at https://github.com/facebook/proxygen or discuss on our Google group: https://groups.google.com/forum/#!forum/facebook-proxygen. Having dealt with mod_rewrite long ago in my career I'm not eager to try to replicate it verbatim within proxygen. That said, we might be open to some kind of simpler configurable filter architecture to rewriting URLs, headers and the like. I think it wouldn't be to hard to write a static file serving http server from the example echo server that ships with proxygen. We weren't immediately planning on that. Proxygen is not trying to be a drop in replacement for the major web servers out there. Instead, it's intended to be a pretty flexible framework for writing HTTP/SPDY/HTTP/2 based applications.
  • Josh Watzman: Yep, just announced today :) http://hhvm.com/blog/10043/experimental-mac-os-x-support