PHP & Zend Engine (50 Qs)•Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)
Modern Dependency Injection and PSR-11.
senior LevelMost AskedDependency InjectionAsync & Promises
In Simple Words:
- PSR-11 (
ContainerInterface): Standardizes how Dependency Injection containers fetch objects ($container->get('service')). - Autowiring: Uses Reflection to inspect class constructor type-hints and automatically resolves and instantiates dependency graphs recursively without manual XML/YAML service declarations.