PHPackages                             dice/types - 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. dice/types

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

dice/types
==========

Near natural implementation of PHP built-in types

026PHP

Since Sep 11Pushed 7y ago2 watchersCompare

[ Source](https://github.com/dicephp/types)[ Packagist](https://packagist.org/packages/dice/types)[ RSS](/packages/dice-types/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dice\\Types
===========

[](#dicetypes)

Dice\\Types (just **Types** hereafter) is a PHP package which attempts to make PHP native types (Strings, Arrays, Integers etc.) behave more naturally using Object Oriented approach. The inspiration for functionality is taken from that of Ruby types.

Installation
------------

[](#installation)

Installation is by using composer. Add the following lines in the `require` section of your *composer.json* file

```
"dice/types": "dev-master"

```

And then run `composer install`

**NOTE**: Types is still in beta. Proceed with caution

Testing
-------

[](#testing)

Download the repo, run `composer install` to install the dependencies and then run `vendor/bin/phpunit tests` to run the tests. If something fails, please let us know.

**IMPORTANT**: Only the Str type tests are available.

Available Types
---------------

[](#available-types)

1. String

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.3% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2824682?v=4)[Vaibhav Kaushal](/maintainers/vaibhav-kaushal)[@vaibhav-kaushal](https://github.com/vaibhav-kaushal)

---

Top Contributors

[![vaibhav-kaushal](https://avatars.githubusercontent.com/u/2824682?v=4)](https://github.com/vaibhav-kaushal "vaibhav-kaushal (50 commits)")[![vaibhav-plackal](https://avatars.githubusercontent.com/u/29974023?v=4)](https://github.com/vaibhav-plackal "vaibhav-plackal (6 commits)")

### Embed Badge

![Health badge](/badges/dice-types/health.svg)

```
[![Health](https://phpackages.com/badges/dice-types/health.svg)](https://phpackages.com/packages/dice-types)
```

PHPackages © 2026

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