Bug #17642 Updated: setting certain locales undefines defines

From: Date: Fri, 07 Jun 2002 15:28:47 +0000
Subject: Bug #17642 Updated: setting certain locales undefines defines
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9766@lists.php.net to get a copy of this message
ID: 17642 Updated by: ilia@prohost.org Reported By: ilia@prohost.org Status: Open Bug Type: Scripting Engine problem Operating System: Linux 2.4.18 PHP Version: 4.2.1 New Comment: Yeah, that does appear to be the problem, any define containing the letter 'I' gets broken after the local is exported. Interestingly enough, if I move the define below the setlocale() lin,e it begins to work fine. Also, this does not seem to be a problem for variable names as they are unaffected by change in locale. Previous Comments: ------------------------------------------------------------------------ [2002-06-07 11:14:40] derick@php.net This is because the 'I' doesn't exist in tr_TR. Derick ------------------------------------------------------------------------ [2002-06-07 11:03:10] ilia@prohost.org One more thing, If i use the get_defined_constants() function to fetch the list of all the defines, the __REQUEST_TIMESTAMP__ is always there and always has the correct value in it. ------------------------------------------------------------------------ [2002-06-07 11:00:38] ilia@prohost.org Setting certain locales, such as tr_TR (Turkish) undefines certain defines. Here is an example script <? define('__REQUEST_TIMESTAMP__', time()); echo "BEFORE: ".__REQUEST_TIMESTAMP__."<br>\n"; setlocale(LC_ALL, 'tr_TR'); echo "AFTER: ".__REQUEST_TIMESTAMP__."<br>\n"; ?> Results in the following output: BEFORE: 1023461965 Notice: Use of undefined constant __REQUEST_TIMESTAMP__ - assumed '__REQUEST_TIMESTAMP__' in /home/forum/test.php on line 12 AFTER: __REQUEST_TIMESTAMP__ On the otherhand using any other locale, such as de_DE or pl_PL seems to work fine and does not undefine the define. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17642&edit=1

« previous php.bugs (#9766) next »