Website | Documentation

A language developed by Facebook to replace(?) PHP.

Hello World in Hack:

namespace Hack\GettingStarted\MyFirstProgram;

function main(): void {
  echo "Welcome to Hack!\n\n";

  \printf("Table of Squares\n" .
  for ($i = -5; $i <= 5; ++$i) {
    \printf("  %2d        %2d  \n", $i, $i * $i);
Hack is built specifically for HHVM, a high performance runtime for your Hack applications, and reconciles the fast development cycle of a dynamically typed language with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

Tags: language  

Last modified 24 May 2024