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 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8