Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60468 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54965 invoked from network); 5 May 2012 16:01:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 May 2012 16:01:58 -0000 Authentication-Results: pb1.pair.com header.from=wim@powerassist.nl; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=wim@powerassist.nl; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain powerassist.nl designates 31.3.97.81 as permitted sender) X-PHP-List-Original-Sender: wim@powerassist.nl X-Host-Fingerprint: 31.3.97.81 vps01.powerassist.nl Received: from [31.3.97.81] ([31.3.97.81:43520] helo=vps01.powerassist.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/54-30075-4FE45AF4 for ; Sat, 05 May 2012 12:01:57 -0400 Received: from ip65-31-208-87.adsl2.static.versatel.nl ([87.208.31.65]:50710 helo=[192.168.1.2]) by vps01.powerassist.nl with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from ) id 1SQhQf-000539-MD for internals@lists.php.net; Sat, 05 May 2012 18:01:53 +0200 Message-ID: <4FA54EF0.3030107@powerassist.nl> Date: Sat, 05 May 2012 18:01:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps01.powerassist.nl X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - powerassist.nl Subject: Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP) From: wim@powerassist.nl (Wim Wisselink) On 05/04/2012 11:22 PM, Galen Wright-Watson wrote: > On Fri, May 4, 2012 at 7:01 AM, C.Koy wrote: > >> On 5/2/2012 10:03 PM, Galen Wright-Watson wrote: >> >>> On Wed, May 2, 2012 at 5:23 AM, C.Koy wrote: >>> >>> On 5/1/2012 9:11 PM, Galen Wright-Watson wrote: >>>> On Thu, Apr 26, 2012 at 3:45 AM, C.Koy wrote: >>>>> As of 5.3.0 this bug does not exist for function names. Only classes >>>>> and >>>>> >>>>>> interfaces. >>>>>> >>>>>> >>>>>> Turns out, if you cause a function to be called dynamically by (e.g.) >>>>>> >>>>> using >>>>> a variable function, the bug will surface. >>>>> >>>>> >>>> setlocale(LC_CTYPE, 'tr_TR'); >>>>> function IJK() {} >>>>> # succeeds >>>>> IJK(); >>>>> >>>>> >>>> If literal function call precedes the function definition, that would >>>> fail >>>> too in 5.2.17, but not in 5.3.0. >>>> What has changed in this regard 5.2->5.3 ? >>>> >>>> >>>> Do you mean something like the following? >>> >> setlocale(LC_CTYPE, 'tr_TR'); >>> IJK(); >>> setlocale(LC_CTYPE, 'en_US'); >>> function IJK() {echo __FUNCTION__, "\n";} >>> >>> I couldn't get it to generate an error under PHP 5.2.17. What am I >>> missing? >>> >>> >> Try this with 5.2.17: >> >> >> > setlocale(LC_CTYPE, 'tr_TR'); >> IJK(); >> function IJK() {} >> >> > That also ran without error for me. I'm not sure how to account for the > different behavior. Here are the details of the system that I'm using: > > $ uname -a >> Linux n10 3.2.6mtv10 #1 SMP Wed Mar 14 06:22:06 PDT 2012 x86_64 GNU/Linux >> $ php -v >> PHP 5.2.17 with Suhosin-Patch 0.9.7 (cli) (built: May 3 2012 12:16:32) >> Copyright (c) 1997-2009 The PHP Group >> Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies >> with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend >> Technologies >> with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH Try to var_dump the setLocale and see if it return the specified locale or just 'false'. If false try the following: setlocale(LC_ALL, 'tr_TR.UTF-8'); I had the same issue.