Table of Contents
Preface
Section 1: PHP 8 Tips
Chapter 1: Introducing New PHP 8 OOP Features
Technical requirements
Using constructor property promotion
Property promotion syntax
Using property promotion for code reduction
Working with attributes
Overview of PHP comments
PHP DocBlock considerations
Hidden dangers associated with the misuse of DocBlocks
The Attribute class
Attribute syntax
Incorporating match expressions into your program code
Match expression general syntax
Understanding named arguments
Named argument generic syntax
Calling core functions using named arguments
Order independence and documentation
Exploring new data types
Union types
mixed type
The effect of a mixed type on inheritance
Improving code using typed properties
Get PHP 8 Programming Tips, Tricks and Best Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.