Bug #66108 [Opn]: Setting locale to 'tr_TR' lowercases parts of constants
| From: | t dot baumgarden at web dot de | Date: | Sun, 17 Nov 2013 18:57:48 +0000 |
| Subject: | Bug #66108 [Opn]: Setting locale to 'tr_TR' lowercases parts of constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182803@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66108&edit=1
ID: 66108
User updated by: t dot baumgarden at web dot de
Reported by: t dot baumgarden at web dot de
Summary: Setting locale to 'tr_TR' lowercases parts of
constants
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: CentOS 6
PHP Version: 5.5.6
Block user comment: N
Private report: N
New Comment:
In short:
setlocale(LC_ALL, 'tr_TR.UTF-8');
echo strtoupper('production');
Result: "PRODUCTiON" with wrong "i"
Previous Comments:
------------------------------------------------------------------------
[2013-11-17 18:41:21] t dot baumgarden at web dot de
Description:
------------
Hi. The (same?) bug was closed long time before here: https://bugs.php.net/bug.php?id=18556
Now its back in php 5.5.6.
Write
setlocale(LC_ALL, 'tr_TR.UTF-8');
I get:
constant(): Couldn't find constant test::PRODUCTiON
and complete page is broken.
See "i" in "PRODUCTiON". Change 'tr_TR.UTF-8' to another string like
'en_US.UTF-8' now its working fine.
Test script:
---------------
class test {
const PRODUCTION = 20;
public static $environment = 10;
}
test::$environment = constant('test::'.strtoupper('production'));
echo (test::$environment);
Expected result:
----------------
20
Actual result:
--------------
Error message: constant(): Couldn't find constant test::PRODUCTiON
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66108&edit=1