Intersection types are a new type system feature coming in PHP 8.1. They let you typehint values that must satisfy more than one type constraint. PHP’s already got union types that combine types with a logical “or” clause; intersection types offer an “and” clause instead.
Read This Article on CloudSavvy IT ›
from How-To Geek https://ift.tt/3wUk0aJ
No comments:
Post a Comment