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

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

rs/dice
=======

A minimalist Dependency injection container (DIC) for PHP. Please note: This branch is only compatible with PHP5.6. 5.5, 5.4 and 5.3 compatible version is available as a separate branch on github.

2.04(9y ago)030BSD-2-ClausePHPPHP &gt;=5.6.0

Since May 6Pushed 9y ago2 watchersCompare

[ Source](https://github.com/RedSnapper/Dice)[ Packagist](https://packagist.org/packages/rs/dice)[ Docs](http://r.je/dice.html)[ RSS](/packages/rs-dice/feed)WikiDiscussions v2.04 Synced 3w ago

READMEChangelog (1)DependenciesVersions (7)Used By (0)

[Dice PHP Dependency Injection Container](https://r.je/dice.html)
=================================================================

[](#dice-php-dependency-injection-container)

Dice is a minimalist Dependency Injection Container for PHP with a focus on being lightweight and fast as well as requiring as little configuration as possible.

Project Goals
-------------

[](#project-goals)

1. To be lightweight and not a huge library with dozens of files (Dice is a single 100 line class) yet support all features (and more) offered by much more complex containers
2. To "just work". Basic functionality should work with zero configuration
3. Where configuration is required, it should be as minimal and reusable as possible as well as easy to use.
4. Speed! (See [the section on performance](#performance))

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

[](#installation)

Just include the lightweight `Dice.php` in your project and it's usable without any further configuration:

Simple example:

```
