PHPackages                             healthengine/coerce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. healthengine/coerce

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

healthengine/coerce
===================

Try to coerce mixed values into desired types or die trying

v1.0.2(1y ago)036.1k↑27.2%MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0

Since Sep 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HealthEngineAU/coerce)[ Packagist](https://packagist.org/packages/healthengine/coerce)[ RSS](/packages/healthengine-coerce/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Coerce
======

[](#coerce)

About
-----

[](#about)

Coerce `mixed` value into a desired scalar type or die trying.

Install
-------

[](#install)

```
composer require healthengine/coerce
```

Usage
-----

[](#usage)

```
