HHVM and Hack Documentation



  • Overview

    A quick introduction to some of Hack's major features.
  • Getting Started

    Five simple steps to installing Hack, and making your first program.
  • Tools

    Tools to help you build Hack apps, like Nuclide - our IDE - or PHP to Hack migration helpers.
  • FAQ

    Common information and questions around Hack.
  • Types

    Introducing typing of parameters, variables, and return values, to prevent errors and make code more readable.
  • Async

    Hack introduces async programming to PHP, letting your apps scale better and reduce blocking.
  • Collections

    Improving upon PHP’s arrays with Vectors, Sets, Maps, and other Collections.
  • XHP

    An easily reusable and customizable UI system that automatically handles escaping and XSS protection.
  • Typechecker

    The bread and butter tool of Hack to ensure code type safety.
  • Shapes

    Adding structure and type-checking to arrays used as structs or records.
  • Tuples

    Bundle together values of possibly different types.
  • Enums

    First-class enumeration types.
  • Generics

    Code that works with multiple types and is type safe.
  • Type Aliases

    Create complex type structures with type aliases
  • Lambdas

    A simplified closure syntax.
  • Type Constants

    An alternative to generics with types declared as members of a class.
  • Attributes

    Decorate classes and methods with meta information.
  • Operators

    Hack has various operators like null-safe and lambda.
  • Callables

    An alternative to the PHP callable typehint.
  • Other Features

    Various other Hack features like constructor parameter promotion.
  • Unsupported

    Hack doesn't support some common PHP features and idioms.

Hack API Reference

Full reference docs for all functions, classes, interfaces, and traits in the Hack language.



  • Getting Started

    Get started with HHVM quickly and easily.
  • Installation

    How to install HHVM on a supported platform.
  • Basic Usage

    The easiest way to run HHVM, with sensible defaults.
  • Advanced Usage

    Advanced usage, with more ways to run and configure HHVM.
  • Configuration

    How to configure HHVM with various user-configurable options.
  • Extensions

    The built in and dynamic extensions that HHVM currently supports.
  • Inconsistencies

    Differences between HHVM and the PHP engine when running code.
  • FAQ

    Common information and questions regarding HHVM.