The alternative to Dependency Injection Containers is to write your own factory classes, methods and closures: this article explains one of the patterns for building dynamic Factory objects, and as such lowers the cost of the second option.
php
frameworks
how-to