As you may have heard or seen already, the Hack programming language has been released for HHVM. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

We have deployed Hack at Facebook and it has been a great success. Over the last year, we have migrated nearly our entire PHP codebase to Hack, thanks to both organic adoption and a number of homegrown refactoring tools.

We are proud to release an open source version of Hack to the public as part of our HHVM runtime platform, which will now support both Hack and PHP.

It is important to note that we have developed Hack to interoperate as seamlessly as possible with PHP. In fact, it is a stated goal of the HHVM team to continue to grow compatibility with the many existing PHP frameworks. The top 20 open source frameworks on Github run on HHVM. We currently pass 9 10 of the top 20 at 100% on their unit tests. Most of the others are passing at or above 90%. We, of course, are working hard to ensure every framework is at or near 100%.

You can view the complete Hack language announcement or go directly to to find out more. Enjoy!


  • James Pearce: This is very exciting. Congratulations to all involved.
  • Tarwin Stroh-Spijer: First, congratulations! Is there a performance difference between using pure PHP and Hack? I'm wondering if it is worth making Hack a Haxe target? [now that is confusing]
  • patlecat: Can you please support openSUSE? I need it with Yii-Framework. Windows would be nice too for development (with XAMPP).
  • Omar Jackman: I think this is very cool but why did you choose this syntax versus the java style approach of: public string function foo(){ return 'Some String'; } I'm not saying it's wrong, bad or anything else negative I'm just wondering what swayed you in this irreversible direction versus another.
  • Marco Pivetta: Probably the most expected feature from the HHVM team :-) I'm waiting for integration with my favorite IDE, but will indeed start experimenting with HACK in the next days. Awesome, thanks!
  • Julien Verlaguet: Omar: There was multiple options, let's review them. int function foo() ... This option would have been consistent with the C tradition. The problem is that we have closures too, and it would have been very hard to make the type annotation fit in that particular place for closures. When one writes: $x = int function( ... That's difficult to parse, especially if the type can be something complex like Vector etc ... We knew that we wanted to expand the type-system, add new types and that each time, adapting the parser for closures would be painful. So we decided not to put them there. Second option: function int foo(...) Internally, we have many people and tools "grepping" for functions, the way they do that is by typing: grep "function foo". It would not have been the end of the world to put it there, but it would have been somewhat painful. That's why we put the type annotation last. I hope this answers your question.
  • Isaac: Do you have any plugins for Eclipse or other IDEs that provide the hh_client's feedback inline with your code?
  • Radu: Hey guys, small issue: your blog's RSS feed URL ( doesn't work anymore. Was it changed to something else ? If yes, where can I find it ? Thanks.
  • Adrian Budau: Is there support for hack with libphutil? I suspect not considering I ahven't seen any big updates to the XHPAST parser. So if not, will there be added in the future? Thanks :-)
  • Paul Tarjan: Open a bug against them.
  • Paul: I second this, a plugin for Eclipse would be gold, otherwise I might stick with PHP
  • Joseph Rex: I find this really interesting as you guys at Facebook are making great contributions to the open source community
  • Amachree: I don't like the semantic of this language
  • Bart Schouten: "Hack" is not a new programming language. It is an annotation-based type-checking and type-tracking system on top of PHP that has no runtime implications save for the collection classes being added. No matter how much it integrates with PHP syntax, and no matter how much weird stuff it introduces (Nullable types? Really?) there are no changes to the runtime of PHP and these features (like the Nullables) just serve to confuse any programmer who no longer can intuit what his code is REALLY doing. And the problem is not the type-checking. It is not even the hideous generics (like in Java). It is not even the Nullables. It is the fact that the presentation of these features is done in a way that makes people believe (or tries to confuse them into believing) that these are really additions to the PHP language when they are not. And this also has implications (much like in Java) for the way these syntaxes are developed and chosen. The syntax itself can serve to confuse people into believing that we are talking about core language features. And it is just a type-tracking type-checking warning-generating system. Nothing more. I haven't checked all of the features thoroughly (like Shapes) but all of it seems parse-time and most of it seems incongruent and ill-designed because of the initial, basic, erroneous decision to treat it as a "language" instead of as an "annotation system" for that language (which is PHP).
  • The king: Probably the most expected feature from the HHVM team :-) I’m waiting for integration with my favorite IDE, but will indeed start experimenting with HACK in the next days. Awesome, thanks!
  • zaxebo1: excellent work. feedback: 1) there is no mention of "wordpress" software compaitibility percentage on the page 2) please make "acquia Drupal" and "wordpress" HUNDRED PERCENT compatible As soon as possible. That will give us a solid confidence in the platform too.
  • Mateus: It may help you
  • Rubeesh: What approach hack use,Is it object-oriented or strutured approach?