Bug #66108 [NEW]: Setting locale to 'tr_TR' lowercases parts of constants

From: Date: Sun, 17 Nov 2013 18:41:21 +0000
Subject: Bug #66108 [NEW]: Setting locale to 'tr_TR' lowercases parts of constants
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182802@lists.php.net to get a copy of this message
From:             t dot baumgarden at web dot de
Operating system: CentOS 6
PHP version:      5.5.6
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:Setting locale to 'tr_TR' lowercases parts of constants

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 bug report at https://bugs.php.net/bug.php?id=66108&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66108&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66108&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66108&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66108&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66108&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66108&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66108&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66108&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66108&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66108&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66108&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66108&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66108&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66108&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66108&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66108&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66108&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66108&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66108&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66108&r=mysqlcfg



Thread (7 messages)

« previous php.bugs (#182802) next »