#48129 [Opn]: spl_autoload and case sensitive
| From: | colder@php.net | Date: | Sat, 02 May 2009 16:15:43 +0000 |
| Subject: | #48129 [Opn]: spl_autoload and case sensitive | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136652@lists.php.net to get a copy of this message | ||
ID: 48129
Updated by: colder@php.net
Reported By: ti dot webdev at gmail dot com
Status: Open
Bug Type: SPL related
Operating System: ALL
PHP Version: 5.2.9
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2009-05-02 06:02:07] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48129&edit=1