ducks-project / spl-types
Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string
Fund package maintenance!
donaldinou
Open Collective
Installs: 28 074
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=7.4
Requires (Dev)
- atoum/stubs: ^2.6
- friendsofphp/php-cs-fixer: ^3.64
- phpbench/phpbench: ^1.2
- phpmd/phpmd: ^2.15
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.3
- squizlabs/php_codesniffer: ^3.10
- vimeo/psalm: ^5.26
README
- Project page: https://github.com/ducks-project/spl-types
- Repository: https://github.com/ducks-project/spl-types
- Original PHP extension: http://php.net/manual/en/intro.spl-types.php
Description
This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string
It provides classes unavailable if you can't install SPL Types extension:
General information
Since v7.0.0, breaking changes has appeared in relation to the pecl extension. This is mainly due to the lack of maintenance and relevance of the original extension, associated with the strong typing introduced in: php 7.4 and the existence of enums since php 8.
Glossary
License
This library is released under the MIT license.