Wouldn't it be better to join forces with the SplClassLoader proposal[1]?
A C implementation of PSR-0 has been prpoposed [2] as well, and would be
nice to get something like that into 5.next

However for your imminent performance needs, you should be aware that an
hash map based autoloaders can be fast as well [3].


[1] http://wiki.php.net/rfc/splclassloader
[2] http://blog.runpac.com/post/splclassloader-php-extension-benchmarks
[3]
http://weierophinney.net/matthew/archives/245-Autoloading-Benchmarks.html

Best
ar


On Wed, Jan 12, 2011 at 11:53 PM, Marc Easen <m...@easen.co.uk> wrote:

> Hello again,
>
> Has anyone had a chance to look at my patch?
>
> Forgive me for being quite eager to get this into trunk, as it will improve
> the performance of all PHP Frameworks which currently implement their own
> autoloader method due to the oddities of the SPL autoloader.
>
>
>
> Kind Regards
> Marc
>
>
> On 26 Dec 2010, at 13:20, Marc Easen wrote:
>
> Hello everyone,
>
> Firstly I would like to introduce myself, my name is Marc Easen and I've
> working with PHP for past 6 years or so. I'm really excited to see where PHP
> is going with the addition of namespaces and now traits, and hopefully I'm
> able to contribute back to PHP community.
>
> I've currently working on a high performance PHP Framework based on version
> 5.3.3+ (5.3.99-dev for traits). Due to the high performance nature of this
> framework I've been looking at ways of improving the loading of the classes.
> It seems by default the spl_autoload() function lowercases the class name
> before trying to locate the file, a couples of users have reported this
> previously and have requested a fix (bug #49852
> http://bugs.php.net/bug.php?id=49852 & bug #53065
> http://bugs.php.net/bug.php?id=53065). spl_autoload() lower casing the
> class names when it is trying to locate the file does not work on *nix based
> system in a lot of PHP Frameworks - Zend Framework being on of them.
>
> Understanding the requirement to support backwards compatibility both
> submitters suggested implementing a spl_autoload_case_sensitivity()
> function. The patch I have attached adds such a function to the SPL
> extension. The patch is against trunk (r306670), it also includes phpt tests
> for this function.
>
> Please could someone review this patch and let me know what you think.
>
> Kind Regards,
>
> Marc
> <spl_autoload_case_sensitive.patch>
>
>
>
>

Reply via email to