3v4l.org

run code in 300+ PHP versions simultaneously
<?php // The controller class Controller { public function indexAction(MyLibrary $obj) { $variable = rand(1,10); // this is the variable my library needs // But this is NOT DI'd as it's only decided here } } // A random object that is a dependency of MyLibrary class AnotherObject { } // This is what is DI'd into my controller class MyLibrary { public function __construct(AnotherObject $obj2, $variable) { } } // Auryn won't know about the $variable until my controller gets it

preferences:
31.11 ms | 402 KiB | 5 Q