Ilia A. wrote: > By using a functiont that does not support lowercasing, would also cause > problems, since if a constant name contains non english characters it would > break. IMHO the best implementation is to simply not lowercase constant names > unless the user specifically whats case insensetive locale.
the language parser should not be affected by locale settings at all, so we need a locale independant zend_str_tolower() function or make sure we have 'C' or 'POSIX' locale this does not only affect constants but also function names and unless we are going to roll up the complete case sensitivity threads *again* rolling our own tolower() function instead of using the one in libc is the only way to go IMHO > > > >>PS: IMHO we have to rethink the complete set_locale() stuff in PHP >> as there is absolutely no way to make it work in threaded SAPIs :( > > > Doesn't work, simply not true. My PHP code uses locales extensively and it > works just fine on Apache 2.0 (threads model) and on IIS, which uses threads. ok, bad wording Sure set_locale() *works* for threaded environments, but it sets the locale globaly for *all* threads, while it should the current PHP thread only. Even worse: setting the locale may affect other components within the webserver totally unrelated to PHP (or trigger the now known tolower() and strtod() problems in other PHP threads, leading to wrong parser behaviour) just imagine an ISP hosting a threaded server for international customers or a big multinational company (or even a small one with multi-lingual web pages) where a lot of scripts running in parallel use set_locale() -> each of them overwrites the current locale for all the other runnning scripts ... GOTCHA -- Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de/ +49-711-99091-77 H.A.R.T.M.U.T.: Hydraulic Artificial Replicant Trained for Mathematics and Ultimate Troubleshooting -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php