Download the PHP package bermudaphp/reflection-type-matcher without Composer
On this page you can find all versions of the php package bermudaphp/reflection-type-matcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package reflection-type-matcher
TypeMatcher
TypeMatcher is a robust PHP class for dynamic type validation using the Reflection API. It helps you determine whether a given variable conforms to a specified reflected type, supporting named types, union types, and intersection types. The class is designed for PHP 8 and later, taking advantage of modern language features like match expressions and strict type comparisons.
Features
- Named Type Matching: Checks if a variable is an instance of a specified class or a built-in type.
- Union Type Matching: Validates the variable against multiple possible types, ensuring it matches at least one.
- Intersection Type Matching: Ensures the variable conforms to every type in a given intersection.
- Strict Comparison Option: Use strict checks for numeric and string types or allow flexible comparisons when needed.
- Lightweight & Standalone: Easily integrate this class into your projects without the overhead of a larger framework.
Install
Usage
All versions of reflection-type-matcher with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
The package bermudaphp/reflection-type-matcher contains the following files
Loading the files please wait ...