tumugin / stannum
Stannum makes PHP's scalar types more expressive!
0.6.0
2022-04-09 17:22 UTC
Requires
- php: >=7.4
- ext-mbstring: *
- beberlei/assert: ^3.3.2
Requires (Dev)
- phpstan/phpstan: ^1.4
- phpunit/phpunit: ^9.5.11
- squizlabs/php_codesniffer: ^3.6.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Stannum makes PHP's scalar types more expressive!
This project is under development. It is not recommended using in production.
Supported environments
Stannum supports and tested on PHP 7.4 or above.
Currently, Stannum is tested on the CI environment below.
- PHP 7.4/8.0/8.1 on latest Windows
- PHP 7.4/8.0/8.1 on latest Ubuntu(Linux)
- PHP 7.4/8.0/8.1 on latest macOS
How to use
// Will return [1, 3, 5] SnIntegerList::byIntArray([1, 2, 3, 4, 5, 6]) ->filter(fn(SnInteger $val) => $val->isOdd()) ->toIntArray();