Learn HACK with Real Code Examples
Updated Nov 20, 2025
Learning Path
Learn PHP basics if not already familiar
Understand Hack's gradual typing
Practice collections, shapes, and generics
Explore async programming with awaitables
Build sample web applications using HHVM
Skill Improvement Plan
Week 1: Hack syntax and typed variables
Week 2: Functions, collections, and shapes
Week 3: Async programming and awaitables
Week 4: Integrate Hack with PHP codebases
Week 5: Build and deploy small web services
Interview Questions
What is Hack and how does it relate to PHP?
Explain gradual typing in Hack
How do Hack collections work?
Describe async/await in Hack
What are Hack shapes and generics?
Cheat Sheet
function foo(int $x): string { } - typed function
$var = vec[1,2,3]; - Hack vector
await asyncFunction(); - async call
shape('name' => string, 'age' => int) - structured data
hh_client - typecheck project
Books
Hack Programming Guide
Mastering Hack for Web Development
Hack by Example
Hack and HHVM in Practice
Advanced Hack Programming Techniques
Tutorials
Getting Started with Hack
Gradual Typing and Collections
Async Programming in Hack
Shapes, Generics, and Type Annotations
Building Web Applications with Hack
Official Docs
Hack Official Documentation
HHVM Documentation
Hack GitHub Repository
Community Links
Hack GitHub repository
HHVM community forums
Stack Overflow Hack tag
Facebook developer resources
Community tutorials and blogs
Community Support
Hack GitHub repository
Facebook developer resources
HHVM community forums
Stack Overflow Hack tag
Hack language documentation