PHPActive
typesafe-functions
Type-safe wrappers around PHP’s native functions — 16,528 lifetime installs
Install
composer require edmondscommerce/typesafe-functionsPHP’s built-in functions are notoriously loose with their return types (string|false, array|null, and so on). This package wraps the common ones in strictly-typed equivalents that throw instead of silently returning a sentinel value.
Averaging around 68 installs a month on Packagist, on top of 16,528 lifetime installs.
Pipeline
- Strict return types
- Wraps loosely-typed native PHP functions so failures throw instead of returning false/null.