All support types can be part of a union, with the following caveats:
- • void can't be part of a union type
- • ?Class is equivalent to Class|null
- • false is an addition, as it is used in the PHP standard library
- • No redundant types, such as: bool|false, or: object|Whisky
Variance:
- • Union types follow standard variance rules
- • Order is irrelevant: int|string and string|int
- • array|Traversable is the same as iterable