Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

PHP to Hack - An Incrementally Typed Adventure at Slack

International PHP Conference via YouTube

Overview

Explore Slack's journey of migrating from PHP to Facebook's Hack programming language in this 31-minute conference talk from the International PHP Conference. Discover the surprising, challenging, and beneficial aspects of transitioning a multi-million line PHP codebase. Learn about Hack's features, including static type checking, inferred generics, union types, and type-safe HTML with XHP. Gain insights into the differences between PHP and Hack arrays, type refinement, and the Hack Standard Library. Understand the process of eliminating PHP dependencies and the lessons learned during the migration. Draw inspiration for your own projects as the speaker reflects on the benefits and drawbacks of Hack, offering valuable perspectives for the PHP community.

Syllabus

Intro
Overview
Static Type Checking
Inferred Generics
Inferred Union Types
Two kinds of Arrays
Arrays with Generics
Hack Arrays
Arrays with mixed types
Using Optional Fields
Type Refinement
PHP Standard Library
Composing PHP functions
Hack Standard Library
Hack Pipeline with HSL
Type Checked Regex
XHP: Type safe HTML
Fix with automation
Move code into functions
DB Types: Before
Inferred Return Types
Untyped code
Eliminate PHP Dependencies
HHVM 4.0 Upgrade
Lessons Learned

Taught by

International PHP Conference

Reviews

Start your review of PHP to Hack - An Incrementally Typed Adventure at Slack

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.