Re: Re: bug 18556 - tolower & locales
| From: | Stas Malyshev | Date: | Wed, 11 Jul 2012 20:47:23 +0000 |
| Subject: | Re: Re: bug 18556 - tolower & locales | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61142@lists.php.net to get a copy of this message | ||
Hi!
> You're changing the Zend API. You introduce new public functions. This
> means an extension that uses the new symbols will be compatible with PHP
> 5.4.6, but not before. When this happens, it's very annoying (like the
> PHP_FE_END in 5.3, though that only affected source compatibility -- this
> also affects binary compatibility).
This is true, however relevant only if your extension uses low-level
Zend engine functions for case-insensitive string comparison, and you're
not using zvals, and you require this comparison to depend on current
locale. This is pretty exotic use case unless you're reimplementing
strcasecmp().
> You also change the behavior of zend_binary_strncasecmp(). Just like you
> had to change ext/standard/string.c, other extensions may also have to
> (not to mention the risk you missed something).
That's kind of the point of the fix - to change the behavior (which
previously depended on current locale and thus produced wrong behavior).
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227