This is a fun one! :)

At our last major version bump (2.0.0), we basically became a whole new project. We switched from a “PHP -> C++” translator to a virtual machine. This version bump (3.0.0) is a much less dramatic code shift (we’re still a VM, don’t worry), but this time the big announcement is that we support a new language, Hack.

I’d like to take some time to reflect on how far we’ve come since version 2.0.0. Back then we had a small semblance of a blog with just 8 posts from Sara and Owen. We didn’t have any type of release process; it was just whenever Sara wanted to cut one. We had a single package, for ubuntu 12.04; now we’re up to 6. We had a bajillion tasks that largely didn’t apply to the VM, so I closed them all. We’re back up to a bajillion (well ~300), but they all are real issues that we are plowing through. We took almost 0 pull requests, now we’re over 400 with 150 different contributors. We didn’t really know how well we run all PHP code, and now we have a cool framework tracking page and a community created one for composer modules. We didn’t hang out with our closest 200 friends on IRC. You couldn’t write extensions nearly as easily. You had to use our own webserver that spawned no end of questions for how to make rewrite rules for it, instead of the standard fastcgi. Oh and there wasn’t even a thought about running it on Heroku or testing on Travis. It has been a big year and I can’t wait to see what comes next.

Alright, enough reminiscing; there is a lot of real business in this release.

  1. The old webserver is gone. If you get something like Uncaught exception: no factory for server type "libevent", you need to switch to fastcgi. Trust me, it is better for you. The package should automatically configure nginx or apache for you if it was installed before HHVM. Read our rationale behind this decision.

  2. We are moving from .hdf config files to .ini. The default one lives in /etc/hhvm/php.ini. We don’t support all the old options yet, so you can still use config.hdf for now, but be ready for it to die in the next release. All of your favorite options will go from Foo { BarBaz = True } to = true.

  3. Hack is of course supported. Keep in mind that one of the major features of Hack is immediate feedback from the type system. This is enforced by a separate tool from HHVM itself, called hh_server and hh_client. These tools are included in the HHVM binary packages, but need to be explicitly set up and started. Also, if you have been running Hack code in the recent nightly packages, we’ve fixed a couple of bugs that may expose additional type errors in your code. In the future, we’ll be careful to ease the transition between stable releases so projects can fix these type errors at their own pace. However, we did not do this for the transition from nightly to stable 3.0.

  4. Our most requested extension, mysqli is now in. Enjoy.

    Update: This extension was broken in 3.0.0 and is fixed in 3.0.1. Make sure to upgrade if you were having problems, and to remove the Eval.CheckReturnTypeHints workaround if you were using it._

  5. Error messages now match PHP5. We no longer have the HipHop prefix, so you don’t have to bust out a rap when you miss an Exception.

Our next 4 alphabetical hiphop artists are here for your enjoyment in the full Changelog:

Donald GloverEminem50 CentGhostface Killah

“Ghostface Killah” 17-Mar-2014

  - Add Hack

  - Remove “HipHop” from error messages

  - Add __IsFoldable user attribute for const-foldable functions

  - Add __Native("NoFCallBuiltin") UA for builtins which need an actrec

  - Add support for testing different outputs in repo mode

  - Implement remaining functionality from intl extension

  - Implement XSL extension

  - Implement Stream Filters

  - Improve php.ini support and get ready to kill HDF files

  - Parse config files as ini files, unless filename contains ‘.hdf

  - Various fixes to Redis, JSON, SPL, DateTime, MySQLi, and others

  - Remove C<T>Ref typedefs (use const T& now)

  - JIT default on in command line mode

  - gethostname() just returns what the syscall returns (Zend compat)

  - HHBBC turned on in the build for

“Fifty Cent” 3-Mar-2014

  - Array parameter type constraints implicitly cast collections to arrays

  - Fix issues with feof and fwrite

  - Fix issues with sleep and inaccessible properties

  - Dump a jemalloc pprod dump when a request hits OOM

  - Make method_exists work with interface inheritance

  - Fix crash in preg_replace with /e

  - Support filename and content type in Curl uploads

  - MySQLi fixes

  - Handle relative paths in is_dir

  - Add string conversion for array_fill_keys

  - Implement various Imagick functionality


  - Implement PHP 5.6 __debugInfo() magic method

  - Raise warnings when return type annotations mismatch

  - Fix nested ArrayObject assignment

  - Switch many ini settings to thread-time binding

  - Clean up memory stat tracking

  - Immutable collections are now prefixed with Imm instead of Fixed/Frozen

  - Clean up type parameter for CheckType-related IR opcodes

  - Remove legacy linear-scan register allocator and Eval.HHIRXls option

“Eminem” 18-Feb-2014

  - reenabled jemalloc tcache flush for idle threads

  - array_combine now performs __toString conversion on objects in $keys

  - Allow streams in move_uploaded_file

  - Fix a bug double closing a UserFile

  - Warn when first arg to call_user_func is an object with no __invoke

  - kill userland hdf functions

  - Final method reports itself as final

  - Implement IntlCalendar

  - Disallow create_function in RepoAuthoritative mode

  - Case-insensitive check for Accept-Encoding: gzip

“Donald Glover” 3-Feb-2014

  - Support for “::class

  - Enable FCallBuiltin for HNI functions

  - json_decode parity with PHP 5.4

  - Fix race condition with profiling vs. non-profiling functions prologues

  - Implement ini_get_all()

  - Begin conversion of runtime options to INI

  - Fix potential PGO-mode crash

  - Fixes and enhancement in IR printing

  - Vector and Set now supported by: array_{shift,unshift,fill_keys,reverse,flip,size,chunk}, min, and max

  - StableMap is now an alias for Map, which retains insertion order

  - Map moved to HH namespace

  - Fixes in XLS spilling of SIMD registers

  - Support SCRIPT_FILENAME in FastCGI

  - Implement stream_context_{get,set}_default

  - Support for Intel VTune Amplifier XE

  - Rewrite of SimpleXML

  - Several HNI conversions, and a helper script

  - Move Pair to HH namespace

  - Fix get_included_files ordering

  - Fix $_SERVER and $_ENV in FastCGI

  - Update timelib to php 5.5.8

  - Some dead code removal


  • Radu: Congratulations, all these improvements obviously take a lot of effort; you should feel proud :) . Please don't forget to keep updating and completing the documentation about Hack, it seems people are really interested in it.
  • Gaurav: Are there any performance benchmarks between Hack on HHVM vs PHP on HHVM? Hack being statically typed language should show better results than PHP.
  • Facebook releases HipHop (HHVM) 3.0, adds mysqli and support for Hack language - Dev Metal: […] improved fork of the entire PHP language) a few days ago, Facebook’s engineering team has shipped HipHop (HHVM) 3.0 today. Beside lots of improvements, the most interesting new features are the native integration of the […]
  • HHVM 3.0 发布,执行 PHP 的虚拟机 | 我爱互联网: […] HHVM 3.0 发布了,这是一个主要的发行版本,最主要的是增加对 Hack 语言的支持。详细的说明请看这里。 […]
  • wwbmmm: 赞!
  • Taking HHVM 3.0 for a spin | János Pásztor: […] even a day has passed since Facebook released a new version of their PHP virtual machine called HHVM. If you don’t know HHVM and you’re coding PHP, you’ve […]
  • Taking HHVM 3.0.0 for a spin | János Pásztor: […] even a day has passed since Facebook released a new version of their PHP virtual machine called HHVM. If you don’t know HHVM and you’re coding PHP, you’ve […]
  • Hack_Fan: I agree with @Gaurav Yes, please; "Are there any performance benchmarks between Hack on HHVM vs PHP on HHVM?" And of course with JIT enable mode.
  • wwbmmm: What about Admin Server and Satellite Servers? These are useful functionality. Are they available with fastcgi mode?
  • Alex: Good work guys. Can we have decimal data type into Hack? Or Hack class for that ?
  • Robson: Hello, I'm testing HipHop in two sites with Wordpress and Magento and am fascinated, the performance is phenomenal. I started reading the documentation yesterday, my english is bad, and I wish someone help me understand something about the php.ini, please: 1 - Where can I see the php directives that are used in HHVM? 2 - If I want to change the maximum upload, just add upload_max_filesize = 200M to / etc / hhvm / php.ini? 3 - I installed the prebuild Debian, how can I install APC, for example? I apologize for the many questions.
  • Is Facebook’s HHVM Building PHP’s Coffin? | Pádraic Brady: […] HHVM 3.0 now released, it’s probably time to start talking about HHVM and the new Hack Language. It’s […]
  • Paul Tarjan: The Admin Server still works but you have to put nginx in front of it. The Satellite servers don't work. What are you using them for?
  • Paul Tarjan: Look at `num` in the hack docs
  • Paul Tarjan: 1) We don't have good docs for it yet. Try things that you expect to work in php and report if they don't work. 2) Yes. 3) Everything is bundled in the main one already.
  • Paul Tarjan: The types are erased at runtime right now, so you don't get any performance gains directly. They stop you from doing stilly things and forcing extra tracelet translations by keeping your types in order, though.
  • wwbmmm: We wan't to use Xbox Server for threading as says. Or is there any way to do parallel excution in fastcgi mode?
  • Paul Tarjan: Why can't you just use multiple requests? Are you passing a lot of state around? I'm sure there is a way to get xbox server working without the libevent server I just haven't put any time into it. I would take a PR if you sent one.
  • Jared Kipe: A build / repo for Ubuntu 14.04 trusty would be appreciated. The saucy version works, if you eliminate the libboost requirements that are not available (by editing deb package).
  • Facebook发布HHVM 3.0 - - Joseph's Home: […] 在Hack编程语言发布之后,Facebook又发布了HHVM(HipHop Virtual Machine)的3.0版本,提供了对这门新语言的支持。Facebook的工程师Paul Tarjan在HHVM博客上宣布了这一消息。 […]
  • jasper: The second thing isn't working. HHVM with Nginx shows me a blank page after trying to upload something.
  • Utomo: May I ask, why using hack name? In some country hack is not good. People seeing as cracking.
  • PHP News You May Have Missed: […] reached version 3 (finally, a sane versioning scheme – a rarity in the PHP world) and publicly introduced Hack, […]
  • HHVM auf dem nächsten Level - […] 2.0.0 – dem letzten großen Game Changer – erfährt man von einem merklich stolzen Paul Tarjan in der offiziellen Ankündigung der HHVM 3.0.0. Und in der Tat sind die Fortschritte seit damals […]