PHP Modern Features
Installation
SKILL.md
PHP Modern Features
Introduction
Modern PHP (7.4+, 8.0+, 8.1+, 8.2+) has evolved dramatically with features that improve type safety, expressiveness, and developer experience. These additions transform PHP from a loosely-typed scripting language into a powerful, type-safe platform for building robust applications.
Key improvements include strict typing, property and parameter types, union and intersection types, match expressions, named arguments, attributes (annotations), enumerations, and readonly properties. These features enable clearer intent, better IDE support, and fewer runtime errors.
This skill covers typed properties, union/intersection types, match expressions, enums, attributes, named arguments, and patterns for leveraging modern PHP effectively.