Re: Progress or just 'a mess'?
| From: | Christoph M. Becker | Date: | Sun, 17 Sep 2017 14:17:41 +0000 |
| Subject: | Re: Progress or just 'a mess'? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100693@lists.php.net to get a copy of this message | ||
On 17.09.2017 at 15:45, Christoph M. Becker wrote:
> On 17.09.2017 at 14:37, Rowan Collins wrote:
>
>> That makes much more sense, but doesn't answer the other question, of if there's
>> a working definition of what we mean by "case insensitive".
>
> For case-insensitive constants zend_register_constant() uses
> zend_str_tolower_copy() which uses zend_tolower_ascii() which looks up
> in tolower_map:
>
> <https://github.com/php/php-src/blob/php-7.0.23/Zend/zend_operators.c#L46-L63>.
> As the name already says, this is a simple ASCII lower case mapping
> (A-Z are mapped to a-z; all others map to themselves). So only
> identifiers consisting solely of ASCII characters can actually be
> case-insensitive.
>
> I presume that this map is also used for other case-insensitive identifiers.
See also Sara's reply to the other thread:
<http://news.php.net/php.internals/100602>.
--
Christoph M. Becker