| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2009-05-02 06:02 UTC] ti dot webdev at gmail dot com
 Description:
------------
spl_autoload function load strtolower($className.$ext) files only
Reproduce code:
---------------
<?
spl_autoload('mylowercaseclass');
spl_autoload('MyClass');
Expected result:
----------------
Loaded mylowercaseclass.php file
Loaded MyClass.php file
Actual result:
--------------
Loaded mylowercaseclass.php file
LogicException: Class MyClass could not be loaded
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
spl_autoload first strtolowers the class name before the lookup, so basically if you use spl_autoload("MyClass") it will look for myclass.php. I'm not sure "fixing it" right now is a good idea since it would break BC.