A new PHP Virtual Machine named 'HipHop Virtual Machine' has been developed by Facebook that will help the company and other programmers as it execute the code 9 times faster than before.A new PHP Virtual Machine named 'HipHop Virtual Machine' has been developed by Facebook that will help the company and other programmers as it execute the code 9 times faster than before.
The social networking giant Facebook has invented a really fast PHP Virtural Machine which will run the PHP application nine time faster. This is a good news for the PHP developers. Now developers can use the features of this PHP VM to run their PHP applications on very fast speed. Facebook is running PHP VM called HHVM (HipHop Virtual Machine), across all of its servers since 2013.
To make the execution quick, Facebook has developed a new PHP Virtual Machine named "HipHop Virtual Machine" that can run 9 times faster than running straight PHP natively on large systems.
Facebook had been working on this project for the last three years. The company wanted to make PHP run really quickly.
In PHP, a source code is executed by the processor directly. This means PHP does not run as quickly as languages C or C++. Facebook wanted to use PHP language only because it is understood by many of the Web programmers who work for the company.
Hence they were looking for solution.
At first, they developed a compiler, called HipHop, which used to translate PHP code into C++, so it then it could be compiled ahead of time for faster performance. But they knew it in time will tap out.
Hence, the social networking giant searched for other options that could increase the delivery of the dynamically created Web pages to its billion users.
In came HHVM. Interestingly it works on the same principle as the Java Virtual Machine. The HHVM has a JIT (Just-In-Time) compiler that converts the human readable source code into machine-readable byte code when it is needed.
JIT allows the virtual machine to call the code really quickly that is best suited for handling a particular type of data.
HHVM is optimized for handling very large, and heavily used, PHP codebases.
Facebook has been using HHVM across all of its servers since the start of 2013.
Programmers who want to speed-up their PHP websites can find the HHVM code made by Facebook at GitHub.
Using HHVM for websites hosted on a Wordpress blog, would help a lot in improving the performance.