Skip to content
Cuelogic
  • Services
        • Product Engineering
          • Product Development
          • UX Consulting
          • Application Development
          • Application Modernization
          • Quality Assurance Services
        • Cloud Engineering
          • Cloud Services
          • DevOps Services
          • Cloud Migration
          • Cloud Optimization
          • Cloud Computing Services
        • Data & Machine Learning
          • Big Data Services
          • AI Consulting
        • Internet of Things
          • IoT Consulting
          • IoT Application Development
        • Innovation Lab as a Service
        • Cybersecurity Services
        • Healthcare IT Services
  • Company
    • About
    • Culture
    • Current Openings
  • Insights
Tell Us Your Project  ❯
Product Development

How Facebook is not using PHP by still using PHP?

2 Mins Read

Facebook technology stack consist of application written in many language, including PHP and many others. Facebook still using PHP but it has built a compiler for it so it can be turned into native code on.

Facebook doesn’t use PHP for its core system, at Facebook, they uses C++ heavily on back end system. Apparently Facebook has many things built in PHP. 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.

Why Facebook created HHVM?

Facebook 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. Facebook PHP code is compiled by their Hip-Hop. It transforms code into highly optimized C++ and then use g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely use features. 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.

Why Facebook created Hack?

Facebook has recently released a new programming Hack language that looks and acts like PHP. 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. Hack runs only on Facebook’s HipHop virtual machine, a competitor to the traditional PHP Zend Engine.

Facebook’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. 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. Type-related errors may not be recognized until runtime. So, Facebook wrote more tests early to enforce type checking, or spend more time refactoring runtime errors after launch. To cure this problem, Facebook added strict typing and runtime enforcement of return types to Hack. Strict typing nullifies the need for a lot of type-related unit tests and encourages developers to catch type-related errors in the development process.

They wanted to make the development process and error-catching process even easier, So Facebook included a type-checking server with its HHVM engine. This server runs locally and monitors Hack code as it is written. Developers’ code editors and IDEs can use this type-checking server to immediately report syntax or type-related errors during code development. Hack is good. It has so many useful features that may never make it into traditional PHP. Facebook’s HHVM engine is more performance than the Zend engine, and it has more internal developers, too, dedicated to constantly making the HHVM engine better, but it does not mean that the PHP Zend engine will disappear. Both the Zend and HHVM engines can and will co-exist

It is obvious that Facebook cares very much about Hack and HHVM, if only for its own benefit. Competition is a good thing, but both Zend and HHVM will benefit from each other’s strengths to Facebook.

Related Reading

[wcp-carousel id="10008"]

Tags
C# hack HHVM PHP php in web application PHP zend engine web technologies
Share This Blog
Share on facebook
Share on twitter
Share on linkedin

People Also Read

DevOps
What is Infrastructure as Code and How Can You Leverage It?
8 Mins Read
Quality Engineering
Cypress vs. Selenium: Which is the Superior Testing Tool?
7 Mins Read
Product Development
Micro Frontend Deep Dive – Top 10 Frameworks To Know About
10 Mins Read

Other Categories

case study
Case Studies
e book
E-Book
video
Webinars
Subscribe to our Blog
Subscribe to our newsletter to receive the latest thought leadership by Cuelogic experts, delivered straight to your inbox!
Services
Product Engineering
  • Product Development
  • UX Consulting
  • Application Development
  • Application Modernization
  • Quality Assurance
Menu
  • Product Development
  • UX Consulting
  • Application Development
  • Application Modernization
  • Quality Assurance
Data & Machine Learning
  • Big Data Services
  • AI Consulting
Menu
  • Big Data Services
  • AI Consulting
Innovation Lab as a Service
Cybersecurity Services
Healthcare IT Solutions
Cloud Engineering
  • Cloud Services
  • DevOps Services
  • Cloud Migration
  • Cloud Optimization
  • Cloud Computing Services
Menu
  • Cloud Services
  • DevOps Services
  • Cloud Migration
  • Cloud Optimization
  • Cloud Computing Services
Internet of Things
  • IoT Consulting
  • IoT App Development
Menu
  • IoT Consulting
  • IoT App Development
Company
  • About
  • Culture
  • Current Openings
Menu
  • About
  • Culture
  • Current Openings
We are Global
India  |  USA  | Australia
We are Social
Facebook
Twitter
Linkedin
Youtube
Subscribe to our Newsletter
cuelogic

We are Hiring!

Blogs
  • What is Infrastructure as Code and How Can You Leverage It?
  • Cypress vs. Selenium: Which is the Superior Testing Tool?
  • Micro Frontend Deep Dive – Top 10 Frameworks To Know About
  • Micro Frontends – Revolutionizing Front-end Development with Microservices
  • Decoding Pipeline as Code (With Jenkins)
  • DevOps Metrics : 15 KPIs that Boost Results & RoI
Menu
  • What is Infrastructure as Code and How Can You Leverage It?
  • Cypress vs. Selenium: Which is the Superior Testing Tool?
  • Micro Frontend Deep Dive – Top 10 Frameworks To Know About
  • Micro Frontends – Revolutionizing Front-end Development with Microservices
  • Decoding Pipeline as Code (With Jenkins)
  • DevOps Metrics : 15 KPIs that Boost Results & RoI
cuelogic

We are Hiring!

Blogs
  • What is Infrastructure as Code and How Can You Leverage It?
  • Cypress vs. Selenium: Which is the Superior Testing Tool?
  • Micro Frontend Deep Dive – Top 10 Frameworks To Know About
  • Micro Frontends – Revolutionizing Front-end Development with Microservices
  • Decoding Pipeline as Code (With Jenkins)
  • DevOps Metrics : 15 KPIs that Boost Results & RoI
Menu
  • What is Infrastructure as Code and How Can You Leverage It?
  • Cypress vs. Selenium: Which is the Superior Testing Tool?
  • Micro Frontend Deep Dive – Top 10 Frameworks To Know About
  • Micro Frontends – Revolutionizing Front-end Development with Microservices
  • Decoding Pipeline as Code (With Jenkins)
  • DevOps Metrics : 15 KPIs that Boost Results & RoI
We are Global
India  |  USA  | Australia
We are Social
Facebook
Twitter
Linkedin
Youtube
Subscribe Newsletter
Services
Product Engineering

Product Development

UX Consulting

Application Development

Application Modernization

Quality Assurance Services

Cloud Engineering

Cloud Services

DevOps Services

Cloud Migration

Cloud Optimization

Cloud Computing Services

Data & Machine Learning

Big Data Services

AI Consulting

Internet of Things

IoT Consulting

IoT Application Services

Innovation Lab As A Service
Cybersecurity Services
Healthcare IT Services
Company

About

Culture

Current Openings

Insights
Privacy Policy  
All Rights Reserved @ Cuelogic 2021

Close