What's new in PHP 8
summary
PHP 8 adds concrete features not buzzwords: union types (including built‑in mixed) let arguments and properties accept multiple concrete types, attributes replace docblock annotations and are discoverable via reflection, Constructor Property Promotion removes repeated property boilerplate, named arguments change public APIs semantics, the nullsafe operator and strict match expression simplify control flow, weak maps enable cache metadata without memory leaks, some warnings become ValueError for true coding errors, str_contains/starts_with/ends_with arrive, JIT compiles hot paths to machine code with an expected overall effect around -5% to +5%, release set for 2020‑11‑26.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:48Union types
- 11:24Attributes
- 13:43Reflection
- 17:33Match Expression
- 20:30NoSafe Operator
- 23:09STR Contains
- 24:17WeakMap
- 26:16ValueError Exceptions
- 28:12JustinTime Compiler
- 29:50Release date
- 30:55Questions








