2m read
Tags: php, hhvm, programming

HHVM has been generating a lot of buzz and excitement in the PHP world recently and if you haven’t heard about HHVM yet you should check my first two posts about it.

Why Should I Care?

That’s a really good question why you should care about HHVM, after all is being developed by Facebook (and Facebook is eeeviiiil right?); well the case is that HHVM is – at least in my humble opinion – the coolest development going around the PHP world right now.

HHVM could change (is already at some extent) the way developers see and think about PHP performance, and how PHP should work. Even if you don’t care and never plan to use HHVM or HACK in any of your projects the mere fact that they exist is a good thing for the PHP community.

Competition, that’s the first thing that HACK and HHVM brings to the table, ideally we should see some features from HACK reimplemented into later versions of PHP, driving development of the standard PHP language further.

HACK Will Never Replace PHP

Nor it should, seems one the most popular topics being used on Hack related articles is about how it could or could not replace PHP (see Sitepoint 2 or Sitepoint 2 ) but in my opinion HHVM/HACK was never meant to be a PHP replacement; it was designed to live side by side with PHP even in the same project.

Heck, you could even have PHP and Hack code running in the same class file and by setting the correct ‘Mode’ parts of the code can be type checked and some can be ignored and treated as regular PHP; Hack’s interoperability with PHP is one of its strongest features and truly lowers the entry curve for all PHP developers.

Final Thoughts

Right now the biggest criticism against HHVM/HACK is that Facebook could just drop the project in the next couple of years, a concern that can easily be put to rest by the fact that Facebook own massive code base(which is in the millions of lines of code) is now running almost on its entirety on HACK.

HHVM/HACK are a refreshing look at the PHP language, is my opinion than even in the bleakest of scenarios there is already a positive outcome from HHVM/HACK coming into existence, as for how far will HACK influence the standard PHP language that is yet to be seen and it will depend greatly on the PHP internals group.


What do you think of what I said?

Share with me your thoughts. You can tweet me at @allanmacgregor.