Bug #74042 [Csd->Nab]: SORT_NATURAL does not work or pass tests

From: Date: Sat, 04 Feb 2017 11:17:31 +0000
Subject: Bug #74042 [Csd->Nab]: SORT_NATURAL does not work or pass tests
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207165@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74042&edit=1 ID: 74042 Updated by: requinix@php.net Reported by: ejrx7753 at gmail dot com Summary: SORT_NATURAL does not work or pass tests -Status: Closed +Status: Not a bug Type: Bug Package: Arrays related Operating System: OS X Sierra, Ubuntu 16.04 PHP Version: 7.0.15 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2017-02-04 10:55:13] ejrx7753 at gmail dot com Nevermind. Ignore this report entirely. ------------------------------------------------------------------------ [2017-02-04 10:29:40] ejrx7753 at gmail dot com Expected 1 1 -1 ------------------------------------------------------------------------ [2017-02-04 10:28:52] ejrx7753 at gmail dot com Nevermind that - underlying sort function works correctly. Expected -1 -1 -1 ------------------------------------------------------------------------ [2017-02-04 10:27:24] ejrx7753 at gmail dot com I just tested the underlying sort function and also get a failure to compare in natural order. var_dump(strnatcasecmp("orange20","Orange3")); var_dump(strnatcmp("orange20","orange3")); var_dump(strcmp("1","2")); Outputs int(1) int(1) int(-1) Expected -1 -1 -1 ------------------------------------------------------------------------ [2017-02-04 00:45:56] ejrx7753 at gmail dot com Correction - does not properly test the "case sensitive" call. Just a side note not central to the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74042 -- Edit this bug report at https://bugs.php.net/bug.php?id=74042&edit=1

« previous php.bugs (#207165) next »