

So, Facebook wrote more tests early to enforce type checking, or spend more time refactoring runtime errors after launch. Type-related errors may not be recognized until runtime. It shows that Facebook depends strongly on the PHP language, But unfortunately PHP was not able to perform as well as possible at Facebook’s scale.
#Facebook webdrive php assert code
Hack runs only on Facebook’s HipHop virtual machine, a competitor to the traditional PHP Zend Engine.įacebook’s maximum internal code is first written with PHP and most of Facebook’s PHP code is converted to a C derivative before being pushed into production. Underneath the hood, however, are a ton of features like static typing, generics, native collections, and many more features for which PHP developers have long been asking. Why Facebook created Hack?įacebook has recently released a new programming Hack language that looks and acts like PHP. Hip Hop includes a code transformer a re-implementation of PHP’s runtime system and a rewrite of many common PHP executions to take advantage of these performance optimization. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely use features. It transforms code into highly optimized C++ and then use g++ to compile it. Facebook PHP code is compiled by their Hip-Hop. Why Facebook created HHVM?įacebook also has created another version the HPHPi and they yet another, the HipHop VM aka HHVM, to simply improve what you have, it is just another implementation of PHP which uses just in time approach.

Actually it’s not the real PHP, Facebook has written alternative version of PHP that is, HipHop’s HPHP’c which help to convert PHP code into C++ which shows that FB not using PHP, but by still using PHP. Apparently Facebook has many things built in PHP. Facebook still using PHP but it has built a compiler for it so it can be turned into native code on.įacebook doesn’t use PHP for its core system, at Facebook, they uses C++ heavily on back end system. Facebook technology stack consist of application written in many language, including PHP and many others.
