How the New Intersection Types in PHP 8.1 Give You More Flexibility

Share
  • July 23, 2021
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 ›

Source : How the New Intersection Types in PHP 8.1 Give You More Flexibility