This document discusses dependency injection with PHP and PHP 5.3. It provides an example of managing user preferences with a User object that depends on a SessionStorage object for persistence between requests. The document argues that directly instantiating dependencies within classes leads to rigid code that is hard to customize or test. Instead, it advocates injecting dependencies through a cl
![Dependency Injection with PHP and PHP 5.3](https://cdn-ak-scissors.b.st-hatena.com/image/square/0943831b79dd871debccd6be2c8738f60ff4b65d/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fdependency-injection-ipc-2009-091118075321-phpapp01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)