On 05/04/2012 11:22 PM, Galen Wright-Watson wrote:
On Fri, May 4, 2012 at 7:01 AM, C.Koy<can5...@gmail.com>  wrote:

On 5/2/2012 10:03 PM, Galen Wright-Watson wrote:

On Wed, May 2, 2012 at 5:23 AM, C.Koy<can5...@gmail.com>   wrote:

  On 5/1/2012 9:11 PM, Galen Wright-Watson wrote:
  On Thu, Apr 26, 2012 at 3:45 AM, C.Koy<can5...@gmail.com>    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.

     <?php
     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?
     <?php
     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:


      <?php
      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.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to