title: IoC Container and global variable
body: <p>I see advise from a lot of people teach not to use <strong>global variable/singleton/static class</strong> and move to use of a iOC container, for example, in PHP larvel framework, it is</p>
  
  <pre><code>App::bind('foo', function($app)
  {
      return new FooBar;
  });
  
  $value = App::make('foo');
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>$value = new FooBar;
  </code></pre>
  
  <p>But to me, the <code>App::bind</code> itself is a static method and cannot be replaced easily.</p>
  
  <p>So, can I say, the iOC (at least in PHP), is just remove the number of hard coded variable and minimized to <code>one</code>, which is the service locator, and it cannot be further reduced, right?</p>