TechForge

24th March 2014

Share this story:

Tags:

Categories::

Back in the early days of the social-networking giant known as Facebook, it was coded in PHP by Mark Zuckerberg and his (then) small team. Of course as the website grew into the unstoppable force it is today, PHP became difficult to manage…

Facebook’s open-source language, Hack, was born out of a necessity – and combines elements of static-type programming languages such as C or C++ with dynamic-type languages like PHP.

Most of PHP is already usable in Hack but requires Facebook’s HHVM (Hip Hop Virtual Machine) which is designed to execute programs written in both languages. The top 20 open source frameworks on Github run on HHVM.

“Hack has deep roots in PHP. In fact, most PHP files are already valid Hack files.” Facebook said, “We have also added many new features that we believe will help make developers more productive.”

The company’s engineers explained that one of the main issues with PHP is coding errors are not necessarily detected until the script had gone live – which can be too late. By combining elements of both static and dynamic languages; programmers can retain all the speed they’d have with a dynamic language (like PHP or Ruby), whilst also catching mistakes before runtime.

“Traditionally, dynamically typed languages allow for rapid development, but sacrifice the ability to catch errors early and introspect code quickly, particularly on larger codebases.” Facebook posted on its engineering blog.

Essentially Facebook has taken PHP; streamlined it, made it better, and made it the official language used internally to run their site used by 1.2 billion users. It’s like PHP+, and now the language has been made open-source and available for anyone to begin tinkering with…

And being open-source, any engineer can help improve it if s/he so wishes. Beta code is now available at Hacklang.org and you can also get Hack programming language tutorials to learn this new language. 

“HHVM is now a runtime that supports both PHP and Hack, so you can start to take advantage of Hack’s new features incrementally.”

What do you think about Facebook’s Hack programming language?

About the Author

Senior Editor

Ryan Daws is a senior editor at TechForge Media with over a decade of experience in weaving narratives and dissecting complex topics. His articles and interviews with industry leaders have earned him recognition as a key tech influencer from numerous organisations. Under his leadership, publications have been praised by analyst firms for their excellence and performance. Connect with him on X, Mastodon, Bluesky, Threads, and/or LinkedIn.

Related

15th September 2026

11th September 2026

11th September 2026

9th September 2026

Join our Community

Subscribe now to get all our premium content and latest tech news delivered straight to your inbox

Popular

20158 view(s)
11630 view(s)
10292 view(s)
6793 view(s)

Subscribe

All our premium content and latest tech news delivered straight to your inbox

This field is for validation purposes and should be left unchanged.