title: Using trait in namespace
body: <p>I'm trying to use a trait in namespace.</p>
  
  <pre><code>namespace {
  
  class Glob {
  
     function __toString() {
        return 'Global Namespace&lt;br /&gt;';
     }
  }
  
  $Ng = new \special\Glob();
  
  echo $Ng;
  
  }
  
  namespace special {
  
  trait myTrait {
      public $config = 'This is Config Trait';
  }
  
  class Glob {
      use \special\myTrait;
      public $v = [];
      function __toString() {
          return 'Special Namespace&lt;br /&gt;';
      }
      function __set( $index,$value ){
          $this-&gt;v[$index] = $value;
      }
      function __get( $index ){
          $this-&gt;v[$index];
      }
  }
  }
  </code></pre>
  
  <p>Note that this is just a test so auto loading here doesn't mean much.</p>
  
  <p>it throws a Fatal error :</p>
  
  <pre><code> Fatal error: Class 'special\Glob' not found in C:\wamp\www\Learnings\namespace.php on line 23
  </code></pre>
  
  <p>But in a global namespace it works great.</p>