Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity() [RSS Feed]

#1 Dec. 26, 2010 13:21:18

Marc E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity()


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,Marcspl_autoload_case_sensitive.patchDescription:Binary data

Attachments:
attachment spl_autoload_case_sensitive.patch (9.2 KB)

Offline

#2 Jan. 12, 2011 22:55:21

Marc E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity()


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.spl_autoload_case_sensitive.patchDescription:Binary dataKind RegardsMarcOn 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>

Attachments:
attachment spl_autoload_case_sensitive.patch (9.2 KB)

Offline

  • Root
  • » PHP
  • » [PATCH] Bug #49852 & Bug #53065 - Adding spl_autoload_case_sensitivity() [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support