当区域设置tr_tr时,包含php的类/函数名中存在大写字母错误


Uppercase letter bug in class/function name of included php when locale tr_TR

当我将区域设置为tr_tr并运行以下代码时:

ini_set("error_reporting",E_ALL);
ini_set("display_errors",1);
setlocale(LC_ALL, 'tr_TR.UTF-8');
require_once("class.phpmailer.php");
$PHPMail = new PHPMailer();
$PHPMail->IsSMTP();

class.phpmailer.php内容为:

class PHPMailer {
    public function IsSMTP() {
        $this->Mailer = 'smtp';
    }
}

我收到这个错误:

Fatal error: Call to undefined method PHPMailer::IsSMTP() in test.php on line 10

如果不设置locate="tr_tr"或不使用大写字母"I"或不包括class,则不会收到错误消息。

注:小写字母中的Turhish"I"等价于"ı"(无点)

在apache配置文件中放入或编辑此行。(在debian喘息/etc/apache2/envvar文件上)

# export LANG

export LANG=tr_TR.UTF-8