> But in order to be case insensitive, PHP needs to know that strtolower("A")
> == 'a'. So if you use Cyrilic for userland functions/classes, php needs a
> cyrillic aware strtolower function. Then the problem is that core
> classes/functions need to use a plain ASCII strtolower for case
> insensitivity. So you cannot both write code in cyrillic and interface with
> plain ASCII internals. One possible, but less than optimal solution is to
> first try a locale aware strtolower, then try a plain ascii strtolower when
> looking up symbols.
>
> John

I can see the confusion about PHP's case-sensitivity and how it mixes
and matches between case-insensitive functions/classes/(arguably even
constants), and case-sensitive variable names, for example.

Its naming rules are a little bit inconsistent in that regard. I just
don't see a point in making it completely locale aware. The fact that
you can do soefunc() and SOMEFUNC() and still invoke the same function
is a benefit. And I suppose for those using UTF-8 encoded function
names it might be convenient to make them case-sensitive as well. I'm
not going to argue that it's not. I'm just going to say that it
doesn't seem to be a significant problem.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to