Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix for bug #18556 #79

wants to merge 1 commit into from

3 participants


Patch to avoid locale-aware lowercasing for letter 'I' in zend_str_tolower() and friends.


This fix looks like a crazy hack, the real solution to this is to change the comparison functions for identifiers not to be locale dependent, not hack around a specific locale and its treatment of the letter "i" in a low-level copying function.


Comment on behalf of stas at

other fix will be done.

@php-pulls php-pulls closed this
@php-pulls php-pulls referenced this pull request from a commit
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed issue #79 (Optimization Problem/Bug)
  fix coverage data for the opcache optimizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2012
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 Zend/zend_operators.c
5 Zend/zend_operators.c
@@ -1907,7 +1907,8 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned in
register unsigned char *end = str + length;
while (str < end) {
- *result++ = zend_tolower((int)*str++);
+ *result++ = (*str == 'I') ? 'i' : zend_tolower((int)*str);
+ str++;
*result = '\0';
@@ -1927,7 +1928,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length) /* {{{ */
register unsigned char *end = p + length;
while (p < end) {
- *p = zend_tolower((int)*p);
+ *p = (*p == 'I') ? 'i' : zend_tolower((int)*p);
Something went wrong with that request. Please try again.