Laravel DI Container

Code
<?php

use Illuminate\Container\Container;

$container = new Container();

// binding closure to container
$container->bind('helloworld', function() {
    return 
'Hello World';
});
echo 
$container->make('helloworld') . PHP_EOL;
// or
echo $container['helloworld'] . PHP_EOL;


$container->bind('ao', function() {
    return new 
ArrayObject([1,2,4,8]);
});
$container->bind('iterator', function($container) {
    return new 
IteratorIterator($container->make('ao'));
});

$iterator $container->make('iterator');
foreach (
$iterator as $val) {
    echo 
$val PHP_EOL;
}
Result
Hello World
Hello World
1
2
4
8
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6