What is HHVM (HipHop Virtual Machine)

By | 23 June, 2016
Share Article

hhvm

Many of php developers heard about HHVM and tried to understand What is HHVM (HipHop Virtual Machine) ? In this article i am going to discus some basics about HHVM.

HHVM or HipHop Virtual Machine has been developed by Facebook. HHVM initally released on December 9, 2011 and the latest stable released on March 30, 2016. HHVM supports Hack, PHP 5 and PHP 7.

HHVM or HipHop Virtual Machine is an open-source virtual machine based on the concept of just-in-time (JIT) compliler which is designed for executing programs written in Hack and PHP. By using the just-in-time (JIT) compilation approach HHVM achieve superior performance and also maintain the development flexibility provided by PHP. HHVM execute the code 9 times faster than usual.
HHVM compiles PHP into an intermediate high-level bytecode (HHBC). HHBC is a bytecode format specifically created for HHVM. This HHBC bytecode is then translated into x64 machine code at runtime by a JIT compiler. At this point HHVM also performs some additional optimizations through a dynamic analysis of the translated This compilation process allows for all kind of optimizations which cannot be made in a statically compiled binary code, thus enabling higher performance of Hack and PHP codes.

Advantages of HHVM

  1. HHVM is faster than PHP.
  2. High perform with low usage of resources.
  3. Compile to HHBC a more effective native code.
  4. It recompile only file in which changes were made.
  5. Is is compaitable to almost open source CMS, E-Commerce and Frameworks like CodeIgniter, CakePHP, Laravel, Magento, Opencart etc.

Disadvantages of HHVM

  1. Compile time a little bit high.
  2. Facebook could not povide support for HHVM. Which slow down its growth.
  3. Support is not avilable for HHVM.

For more info read here

How to install HipHop Virtual Machine (HHVM) on Ubuntu ?

Its very easy to install the HHVM on Ubutnu. So lets start .

1) First we need to import HHVM repository’s GnuPG public keys our apt-key. For this use below command

2) Now add HHVM’s repository to our list. For this use below command

3) Now update your apt-get. For this use below command

4) Now install HHVM using below command

This command will install HHVM on your machine. You can check the HHVM installation by using below command

This command will show you output like

install-hhvm-on-ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *


*