php.net |  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: aharvey@php.net 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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: aharvey@php.net
New email:
PHP Version: OS:

 

 [2007-01-10 07:59 UTC] aharvey@php.net
Description:
------------
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:
---------------
<?php
class C {
    function I() {
        echo "I there!\n";
    }
}
$c = new C;

setlocale(LC_ALL, 'en_AU');
$c->I();

setlocale(LC_ALL, 'tr_TR');
$c->I();
?>

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-10 10:42 UTC] johannes@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 17:01:32 2024 UTC