palate 0.3.9

File type detection combining tft and hyperpolyglot
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// from https://docs.hhvm.com/hack/getting-started/getting-started
// note: no <?hh header needed for .hack files

namespace Hack\GettingStarted\MyFirstProgram;

<<__EntryPoint>>
function main(): noreturn{
  echo "Welcome to Hack!\n\n";

  \printf("Table of Squares\n" .
          "----------------\n");
  for ($i = -5; $i <= 5; ++$i) {
    \printf("  %2d        %2d  \n", $i, $i * $i);
  }
  \printf("----------------\n");
  exit(0);
}