Hack
HHVM
See Something Wrong? File an Issue
Search our Documentation
Getting Started
Getting Started
Tools
Starting A Real Project
The Hack Standard Library
Input And Output
Source Code Fundamentals
Introduction
Program Structure
Comments
Names
Keywords
Literals
Scope
Constants
Variables
Script Inclusion
Namespaces
Expressions And Operators
Introduction
Operator Precedence
Echo
Exit
Invariant
List
New
Subscript
Member Selection
Scope Resolution
Nameof
Incrementing And Decrementing
Error Control
Casting
Await
Type Assertions
Arithmetic
String Concatenation
Bitwise Operators
Logical Operators
Comparisons
Equality
Ternary
Coalesce
Pipe
Assignment
Yield
XHP Attribute Selection
Statements
Introduction
Break And Continue
Do
For
Foreach
If
Return
Switch
Try
Use
Using
While
Functions
Introduction
Anonymous Functions
Type Enforcement
Format Strings
Inout Parameters
Function References
Classes
Introduction
Methods
Properties
Inheritance
Constructors
Constants
Type Constants
Object Disposal
Type Constants Revisited
Methods With Predefined Semantics
Traits And Interfaces
Introduction
Implementing An Interface
Using A Trait
Trait And Interface Requirements
Arrays And Collections
Introduction
Vec Keyset And Dict
Object Collections
Varray And Darray
Mutating Values
Types
Introduction
Soft Types
Generic Types
Nullable Types
Type Conversion
Type Aliases
Supertypes And Subtypes
Type Refinement
With Refinement
Type Inferencing
Built In Types
Introduction
Bool
Int
Float
Num
String
Void
Tuples
Shape
Arraykey
Enum
Enum Class
Enum Class Label
This
Classname
Darray Varray Runtime Options
Resources
Null
Nonnull
Mixed
Dynamic
Noreturn
Nothing
Generics
Introduction
Type Parameters
Type Constraints
Variance
Type Erasure
Contexts And Capabilities
Introduction
Local Operations
Closures
Higher Order Functions
Contexts And Subtyping
Context Constants
Dependent Contexts Continued
Available Contexts And Capabilities
Reified Generics
Introduction
Reified Generics
Reified Generics Migration
Asynchronous Operations
Introduction
Awaitables
Exceptions
Async Blocks
Concurrent
Await As An Expression
Utility Functions
Extensions
Generators
Guidelines
Examples
Readonly
Introduction
Syntax
Subtyping
Explicit Readonly Keywords
Containers And Collections
Advanced Semantics
Modules
Introduction
Defining Modules
Using Internal
Inheritance
Traits
Type Aliases
Closures And Function Pointers
Reflection And Migration
Packages
Introduction
Deployments
Cross Package Calls
Configuration Spec
Attributes
Introduction
Predefined Attributes
XHP
Setup
Introduction
Basic Usage
Interfaces
Methods
Extending
Migration
Guidelines
Further Resources
Silencing Errors
Introduction
Error Codes
Contributing
Introduction
Writing Content
Code Samples
Information Macros
Generated Content
Experimental Features
Introduction
Expression Trees
Introduction
Syntax Supported
Splicing
Defining Dsls
Dsl Types
Memoization Options
Introduction
Documentation
hack
Learn
Source Code Fundamentals
Introduction
Source Code Fundamentals: Introduction
Topics covered in this section
program structure
comments
constants
keywords
literals
names, user-defined
namespaces
scope
script inclusion
variables
Input And Output
Getting Started:
Program Structure
Source Code Fundamentals:
Was This Page Useful?
Thank You!
Thank You! If you'd like to share more feedback, please
file an issue
.