HHVM 3.1.0 Released

Share this article

The HHVM team just released version 3.1.0.

The team focused on cleaning out the Github repo for the most part, fixing bugs and open issues, but new features have landed as well. This release brings HHVM closer in sync with PHP 5.6., the features of which we’ve written about before.

The highlights are implementing the $...args functionality, 400 ini tweakable settings, and – something that sounded most interesting to me – improvements on the Zend Extension Compatibility Layer. This layer will allow building existing PHP extensions with HHVM, with minor tweaks required in the source code. In time, the layer will hopefully be in such a state to allow seamless transition of extensions.

I’m hoping to see Phalcon compatible with this so we can enjoy it on HHVM as well, but I’m waiting to hear back from the Phalcon team on this issue before being too optimistic. In the meanwhile, other extension developers are encouraged to tweak their extensions and try to build them on HHVM in an attempt to reach compatibility.

The full changelog, as quoted from the original release post but with some added links and an explanation or two:

“Kanye West”

  • Backport fix for CVE-2011-2202
  • Interfaces {Keyed}Container match arrays and collections, not iterables
  • Added ** and **= operators to HHVM and more compatibility fixes with PHP5.6
  • Fixes and improvements to collections
  • Replace json decoder with json-c library
  • Document VMRegAnchor and isVMFrame()
  • Improvements to array iterator code
  • Improvements to the type checker
  • Allow parser to be generated with bison 3
  • Improvements and speed up to reflection code

“Jay-Z” 9-May-2014

  • Make handling of code.hot overflows more robust
  • Catch server errors sooner
  • Fix segfault and infinite recursion in fileinfo extension
  • Resolve systemlib constants at compile time
  • Resume resumables natively
  • Import round() table optimizations from php-src
  • Delete bytecode Peephole optimizer
  • Remove most of annotation.cpp, and some other code gated on !UsedHHBBC
  • Create phis for locals
  • Fix free of “” in rfc1867PostHandler
  • Add firstValue(), firstKey(), lastValue(), lastKey() to collections
  • Add concat() to collections
  • Clarify Hack license
  • Add CakePHP3 to test runner
  • Better error when TC is full
  • Add hash_equals() from PHP 5.6

“Insane Poetry” 24-Apr-2014

  • Support for PHP 5.6 variadic …$args syntax for func declarations
  • Open source HHMeasure, a simple and extensible microbenchmarking tool
  • Added a new time-based sampling profiler (Project Xenon)
  • Fix PCRE unicode handling
  • Convert Zend compatibility layer and various extensions to HNI
  • Encode execution mode (eager or resumed) into SrcKey
  • Merge eager and resumed parts of async functions
  • Rework various async / continuation bytecode instructions

“House of PHPain” 1-Apr-2014

  • Allow direct arg passing with up to 15 params (7 if at least one is a double)

If you’re one of the people who enjoy reading the rawest of changelogs, the full one is here.

If you’d like to try the new HHVM out, I’ve made a Vagrantfile that gets it up and running for you in a matter of minutes, without polluting your host machine with needless runtimes.

Simply clone this repo and you’ll have the most up to date HHVM installed into Ubuntu 14.04., with Nginx as a server and a working MySQL database installed. The Vagrantfile was made with the help of PuPHPet but edited additionally.

To check that you’re running the latest version of HHVM (the one that includes Hack and the 3.1.0. updates) simply check the version of PHP – the HHVM executable has replaced the regular PHP, and can be called directly:

Please note that I haven’t yet fully tweaked the repo to be usable out of the box, so you’ll need to fiddle with the Nginx Vhost configuration first to make it read PHP files. I also haven’t yet activated remote MySQL connections on this box, but it’ll happen and I’ll update this post accordingly.

Are you using HHVM in production? Playing around with it at least? Let us know – we’re keen to publish advanced examples of HHVM and Hack use.

Bruno SkvorcBruno Skvorc
View Author

Bruno is a blockchain developer and technical educator at the Web3 Foundation, the foundation that's building the next generation of the free people's internet. He runs two newsletters you should subscribe to if you're interested in Web3.0: Dot Leap covers ecosystem and tech development of Web3, and NFT Review covers the evolution of the non-fungible token (digital collectibles) ecosystem inside this emerging new web. His current passion project is RMRK.app, the most advanced NFT system in the world, which allows NFTs to own other NFTs, NFTs to react to emotion, NFTs to be governed democratically, and NFTs to be multiple things at once.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week