From: jo at feuersee dot de Operating system: Linux PHP version: 5.3.0 PHP Bug Type: SPL related Bug description: Feature request: spl_autoload_cs
Description: ------------ This is related to #49625 Ok I agree that spl_autoload() won't be touched because of BC (Seems the convention to lowercase all filenames has been borrowed from Java and ppl are actually using it). How about a case sensitive function spl_autoload_cs() then? It should behave excactly like spl_autoload() except that it skips the lowercasing stuff. Projects using a case sensitive naming convention (PEAR, Zend Framework, ...) can unregister the default spl_autoload() and register spl_autoload_cs() and it will work. I am aware that it is possible to write an own callback in PHP. The problem is that you can't write the callback once and then put it in your codebase because the callback is the glue between your script and the codebase. I do a lot of scripting PHP on the CLI and am tired of duplicating my callback function code over and over again just to make sure the script will work with a case sensitive design paradim. Reproduce code: --------------- <?php /** * proposed usage of new feature spl_autoload_cs() */ spl_autoload_unregister('spl_autoload'); spl_autoload_register('spl_autoload_cs'); // executing a PEAR class would work now $phpbin = System::which('php'); ?> -- Edit bug report at http://bugs.php.net/?id=49640&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49640&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49640&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49640&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49640&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49640&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49640&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49640&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49640&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49640&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49640&r=support Expected behavior: http://bugs.php.net/fix.php?id=49640&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49640&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49640&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49640&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49640&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49640&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49640&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49640&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49640&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49640&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49640&r=mysqlcfg