What's New in PHP 8.1 and 8.2
summary
Enumerations with backed values and Enumerations with backed values become real types usable in constructors and format helpers, Fibers land as Fibers for cooperative multitasking letting concurrent I/O without threads, intersection and DNF (disjunctive normal form) types let unions of intersections express complex constraints, readonly classes and readonly properties enforce one-time initialization, dynamic properties emit deprecation notices that break tests until fixed, a new random extension exposes three engines with deterministic seeding options, and a sensitive parameter attribute masks secrets in stack traces.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:28PHP type system evolution
- 3:57Union types in PHP 8.0
- 6:27Read-only properties in PHP 8.1
- 8:54Mixed type practical use
- 10:44Constructor property promotion
- 11:51Named arguments for clarity
- 15:22Enumerations in PHP 8.1
- 22:47Never type for non-returning
- 25:14Pure intersection types
- 26:18Array spread operator
- 28:44Fibers for multitasking
- 30:53First-class callable syntax
- 34:24Standalone null false true types
- 37:15DNF types in PHP 8.2
- 38:41Random extension improvements
- 41:51Dynamic properties deprecation
- 46:03Sensitive parameters security
- 49:16Q&A








