Overview
The type system is shipped within the library, but it’s completely separate from reflection. It’s designed to be as simple as possible - you won’t find complex inheritance trees like you would in PHPStan’s type system.
All types implement a single interface - Type. It is “sealed” - meaning it’s only meant to be implemented
by this library, and there is a limited set of inheritors, so it’s safe to check for type using
$type instanceof UnionType kind of checks.
Full list of types
Section titled “Full list of types”Here’s a full of list of types: