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

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.16 ms | 2404 KiB | 9 Q