Re: strcoll() behaviour on PHP6
| From: | Andrei Zmievski | Date: | Thu, 30 Apr 2009 17:30:59 +0000 |
| Subject: | Re: strcoll() behaviour on PHP6 | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64834@lists.php.net to get a copy of this message | ||
It probably should be, but I would just make a note about it and do it later. Lots of other stuff will need to be documented for 6, so we should accumulate notes for now.
-Andrei
zoe wrote:
Hi Andrei - I'm seeing a minor difference in behaviour between PHP5 and PHP6 fort strcoll(). This code: $a = 'a'; $b = 'A'; setlocale (LC_COLLATE, 'en_US'); // PHP6 locale_set_default ('en_US'); $result = strcoll($a, $b); var_dump($result); Gives a -ve number on PHP6 and +ve on PHP5. As far as I can tell the PHP6 behaviour correctly follows the ICU locale implementation (http://userguide.icu-project.org/collation/concepts). So, in the example above a<A in PHP6 but a>A in PHP5. On the assumption that this is an intentional change in default behaviour between PHP5 and PHP6 should it be documented somewhere? Apologies if it is, but I can't find it. Zoe