|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40086 Method call failure with tr_TR locale
Submitted: 2007-01-10 07:59 UTC Modified: 2007-01-10 10:42 UTC
From: Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS-2007-01-10 (CVS) OS: Linux (CentOS 4)
Private report: No CVE-ID: None
 [2007-01-10 07:59 UTC]
Calling object methods with uppercase I characters in their names fails when the locale is set to Turkish (tr_TR). This is presumably because 'i' is not the lowercase equivalent to 'I' in the language, so strcasecmp("I", "i") returns a non-zero value.

Reproduce code:
class C {
    function I() {
        echo "I there!\n";
$c = new C;

setlocale(LC_ALL, 'en_AU');

setlocale(LC_ALL, 'tr_TR');

Expected result:
I there!
I there!

Actual result:
I there!

Fatal error: Call to undefined method C::I() in /tmp/undefined.php on line 15


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-10 10:42 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

We won't change this till PHP 6.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 12:01:27 2023 UTC