|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 Patchesspl_autoload_case_sensitive (last revision 2010-12-27 14:34 UTC by marc at easen dot co dot uk)Pull RequestsHistoryAllCommentsChangesGit/SVN commits              [2011-01-04 10:23 UTC] chris at cmbuckley dot co dot uk
  [2020-06-10 09:37 UTC] nikic@php.net
 
-Status: Open
+Status: Wont fix
  [2020-06-10 09:37 UTC] nikic@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 06:00:01 2025 UTC | 
Description: ------------ I Opened This because #48129 is set to "won't fix". But this affects major frameworks i.e. (ZendFramework, FLOW3).It would be nice to tell spl_autoload() not to lowercase all filenames so that these framworks can benefit from its performance. To stay backwards compatible this could be done via php.ini or a function call. I would suggest spl_autoload_casesensitive in php.ini or a method spl_autoload_casesensitive(bool $flag); Another more compatible option could be handling this inside of spl_autoload(). Check for unmodified case first (i.e. Zend/Db/Adapter/Abstract.php) and if this is not available try lowercased (i.e. zend/db/adapter/abstract.php) This Solutions won't break BC! Test script: --------------- <?php namespace Test; use Zend\Controller; slp_autoload_casesensitive(true); spl_autoload_extensions('.php'); spl_autoload_register(); // this should load from correct ZF path: Zend/Controller/Front.php; $request = new Controller\Front(); Expected result: ---------------- Class should be loaded from Zend/Controller/Front.php in include path Actual result: -------------- Class is always loaded from zend/controller/front.php in include path