PHPackages                             sushi-market/smart-cast - 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. sushi-market/smart-cast

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

sushi-market/smart-cast
=======================

Smart casts for PHP

v1.1.1(6mo ago)61.8k↓44%1MITPHPPHP ^8.1CI passing

Since Oct 28Pushed 6mo agoCompare

[ Source](https://github.com/sushi-market/smart-cast)[ Packagist](https://packagist.org/packages/sushi-market/smart-cast)[ RSS](/packages/sushi-market-smart-cast/feed)WikiDiscussions master Synced 1mo ago

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

🔮 Smart Cast for PHP
====================

[](#-smart-cast-for-php)

[![PHP Version](https://camo.githubusercontent.com/7535257ca228724c93658bd52583d4e47a9bab02c356abf6e54c1d575f2151e6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d626c75652e737667)](https://php.net)[![Latest Version](https://camo.githubusercontent.com/4c3107027c6e16df22cd43c196b84918caf423c4b9f4db5bfdade869b6a8c99b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73757368692d6d61726b65742f736d6172742d636173742e7376673f7374796c653d666c61742d737175617265)](https://github.com/sushi-market/smart-cast/releases)[![Total Downloads](https://camo.githubusercontent.com/15675b377ca1b3f2a77171c92897965fe5508aa8ed18ee7752ec3212d23faf56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757368692d6d61726b65742f736d6172742d636173742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sushi-market/smart-cast)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

**Smart Cast** - An elegant and type-safe library for intelligent type casting in PHP. Eliminate boilerplate code and work with data confidently!

✨ Features
----------

[](#-features)

- 🎯 **Intuitive API** - Simple and clear syntax
- 🛡️ **Type Safety** - Comprehensive validation and exception handling
- 🚀 **Performance** - Optimized conversions with minimal overhead
- 📦 **Zero Dependencies** - No external dependencies required

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require sushi-market/smart-cast
```

```
