Use namespace in global context with autoloader
<p>Due to an external library I have to use namespaces. Since I havn't used namespaces before I realised using a namespace won't work with my <code>__autoload()</code>. The code below will say </p>

<blockquote>
  <p>Failed to load class Foo\Bar\NamespaceClass, please update the autoloader!</p>
</blockquote>

<p>How may I fix this? The <code>Foo</code> class is just a wrapper around the external library.</p>

<pre><code>// This is my autoloaded class file
use Foo\Bar\NamespaceClass;

class Foo
{
    public function Bar()
    {
        $namespaceClass = new NamespaceClass();
    }
}

// This is a separate file calling my class "Foo" from global namespace
$myAutoloadedClass = new Foo();
$myAutoloadedClass-&gt;Bar();
</code></pre>
