Books & Videos

Table of Contents

  1. Chapter 1 Typechecking

    1. Why Use the Typechecker?

    2. Setting Up the Typechecker

    3. Type Annotation Syntax

    4. Hack’s Type System

    5. Rules

    6. Type Inference

    7. Refining Types

    8. Enforcement of Type Annotations at Runtime

  2. Chapter 2 Generics

    1. Introductory Example

    2. Other Generic Entities

    3. Type Erasure

    4. Constraints

    5. Unresolved Types, Revisited

    6. Generics and Subtypes

    7. Advanced: Covariance and Contravariance

  3. Chapter 3 Other Features of Hack

    1. Enums

    2. Type Aliases

    3. Array Shapes

    4. Lambda Expressions

    5. Constructor Parameter Promotion

    6. Attributes

    7. Enhanced Autoloading

    8. Integer Arithmetic Overflow

    9. Nullsafe Method Call Operator

    10. Trait and Interface Requirements

    11. Silencing Typechecker Errors

  4. Chapter 4 PHP Features Not Supported in Hack

    1. References

    2. Old-Style Constructors

    3. Case-Insensitive Name Lookup

    4. Variable Variables

    5. Dynamic Properties

    6. Mixing Method Call Syntax

    7. isset, empty, and unset

    8. Others

  5. Chapter 5 Collections

    1. Why Use Collections?

    2. Collections Have Reference Semantics

    3. Using Collections

    4. Type Annotations for Collections

    5. Interoperating with Arrays

  6. Chapter 6 Async

    1. Introductory Examples

    2. Async in Detail

    3. Structuring Async Code

    4. Other Types of Waiting

    5. Common Mistakes

    6. Async Extensions

  7. Chapter 7 XHP

    1. Why Use XHP?

    2. How to Use XHP

    3. Creating Your Own XHP Classes

    4. XHP Best Practices

    5. Migrating to XHP

    6. XHP Internals

  8. Chapter 8 Configuring and Deploying HHVM

    1. Specifying Configuration Options

    2. Server Mode

    3. Warming Up the JIT

    4. Repo-Authoritative Mode

    5. The Admin Server

  9. Chapter 9 hphpd: Interactive Debugging

    1. Getting Started

    2. Evaluating Code

    3. The Execution Environment

    4. Using Breakpoints

    5. Viewing Code and Documentation

    6. Macros

    7. Configuring hphpd

  10. Chapter 10 Hack Tools

    1. Inspecting the Codebase

    2. Migrating PHP to Hack

    3. Transpiling Hack to PHP