PHPackages                             siestacat/php-array-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. siestacat/php-array-cast

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

siestacat/php-array-cast
========================

Force cast one dimension array

1.0.2(2y ago)0138Apache-2.0PHPPHP &gt;=8.0

Since Nov 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/SiestaCat/php-array-cast)[ Packagist](https://packagist.org/packages/siestacat/php-array-cast)[ RSS](/packages/siestacat-php-array-cast/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

phpfilemanager
==============

[](#phpfilemanager)

Install:

```
composer require siestacat/php-array-cast

```

Usage:

```
use Siestacat\PhpArrayCast\Cast;

Cast::class(range(0,9), \stdClass::class); //Will throw error
Cast::class(array_fill(0, 9, new \stdClass), \stdClass::class); //No error

Cast::type(range(0,9), 'string'); //Will throw error
Cast::class(array_fill(0, 9, 'banana'), 'string'); //No error

```

Tests:

```
git clone https://github.com/SiestaCat/php-array-cast.git
cd php-array-cast
composer install
composer run-script test

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

3

Last Release

913d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca98832625a64cba12756be206d342ed01269e7f17e6badef120b4c8e30a90ca?d=identicon)[SiestaCat](/maintainers/SiestaCat)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/siestacat-php-array-cast/health.svg)

```
[![Health](https://phpackages.com/badges/siestacat-php-array-cast/health.svg)](https://phpackages.com/packages/siestacat-php-array-cast)
```

###  Alternatives

[zzstudio/think-addons

The ThinkPHP6 Addons Package

1518.6k](/packages/zzstudio-think-addons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
