PHP trying to include array of glob()'d directories and is not finding last one
<p>Hello I have the following method:</p>

<pre><code>private static function loadIncludes()
{
    // prepare array of files from folders
    $files = array(
        glob(self::libPath()."/*.php"),
        glob(self::controllersPath()."/*.php"),
        glob(self::extensionsPath()."/*.php"),
    );

    // include files
    foreach ($files as $set)
    {
        if (is_array($set)) foreach ($set as $file)
        {
            require_once($file);
        }
    }
}
</code></pre>

<p>If I print_r the $files array it contains all the files but for some reason its not doing a require_once() on the last array item (/home/<em>*</em>/app/extensions/Controller.php)
see output:</p>

<pre><code>Array
(
    [0] =&gt; Array
        (
            [0] =&gt; /home/***/app/lib/CApp.php
            [1] =&gt; /home/***/app/lib/CController.php
            [2] =&gt; /home/***/app/lib/CDb.php
            [3] =&gt; /home/***/app/lib/CView.php
        )

    [1] =&gt; Array
(
            [0] =&gt; /home/***/app/controllers/SiteController.php
        )

    [2] =&gt; Array
(
            [0] =&gt; /home/***/app/extensions/Controller.php
        )

)
</code></pre>
