[dcphp-dev] Re: Global Variables Question

2017-03-28 Thread Tim Burch
I agree with Ray that dependency injection is a more elegant solution to the problem. It makes certain resources, for example, a database connection, available throughout an application or framework, while minimizing mutability and the problems & confusion that come with it. Here's another arti

[dcphp-dev] Re: Global Variables Question

2017-03-28 Thread Ray Paseur
Hi, Whitney. Here's my take on the issue. https://www.experts-exchange.com/articles/1/PHP-Design-Avoiding-Globals-with-Dependency-Injection.html On Monday, March 27, 2017 at 8:24:57 AM UTC-4, Whitney Yiu wrote: > > Hi all, > > I am reading a book (*PHP and MySQL Web Development* - Thomson, W