PHP - spl_autoload and namespaces - doesn't work with capital letters
<p>I've set up a really basic autoloader in my <code>index.php</code> to grab a namespaced class within <code>hello.php</code>. My development environment is <em>Ubuntu 12.04</em>.</p>

<p>Why am I trying to do this? I'm trying to stick to the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md" rel="nofollow">PSR-1</a> and <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md" rel="nofollow">PSR-2 coding standard</a>, that includes:</p>

<blockquote>
  <p>Class names MUST be declared in StudlyCaps</p>
  
  <p>Namespaces are as /Vendor/Class (note: capitals)</p>
</blockquote>

<p>The following is my structure and code <em>that works</em> <strong><em>before</em></strong> <em>making the changes</em> to capitals.</p>

<p><strong>Folder Structure</strong></p>

<pre><code>- web
  -- index.php
  -- core
    --- hello.php
</code></pre>

<p><strong>Autoloader</strong></p>

<p>Within index.php, I have my autoloader:</p>

<pre><code>set_include_path(__DIR__);
spl_autoload_extensions('.php,.class.php');
spl_autoload_register();
</code></pre>

<p><strong>Class File</strong></p>

<p>Within the core folder, I have hello.php</p>

<pre><code>namespace core;

class hello {
    public function __construct() {
        echo 'Constructed!';
    }
}
</code></pre>

<p><strong>Code that works</strong></p>

<p>If I run <code>$obj = new \core\hello();</code> in my <code>index.php</code>, I get back "Constructed!". Great!</p>

<hr>

<p><strong>That which doesn't work</strong></p>

<p>Renaming my core folder to 'Core' - note the uppercase C, and also the namespace in <code>hello.php</code> to <code>namespace Core;</code>.</p>

<p>Now let's try again with <code>$obj = new \Core\hello();</code></p>

<p><code>Fatal error: Class 'Core\hello' not found in ...</code></p>

<p>So please tell me, why am I not able to use capital letters to keep inline with the PSR standards? What am I doing wrong?</p>
