Type declarations allow the type to be specified for properties, function parameters, and function return types. This permits the PHP engine to enforce that the specified types are used.
18. Type Declarations
Get PHP 8 Quick Scripting Reference: A Pocket Guide to PHP Web Scripting 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.