Awesome Features of PHP8
summary
Live code shows PHP 8.0–8.2 changes by replacing a 10‑line switch with a four‑line match expressions example that returns "not set" or the matched class name, and PhpStorm auto‑converts switches to matches. Demonstrations prove named parameters let arguments be passed out of order (but warn against using them for third‑party APIs). Constructor property promotion removes separate property declarations and assignments, read‑only properties/classes (8.1/8.2) prevent external mutation, and the null‑safe operator short‑circuits chains instead of manual if checks.
AI-written summary · about
chapters (7)
- 0:00Introduction and setup
- 2:07Match expressions
- 8:11Named parameters
- 15:20Constructor property promotion
- 21:44Read-only properties
- 25:51Read-only classes
- 28:34Null safe operator








