Bug #74042 [Opn->Csd]: SORT_NATURAL does not work or pass tests
| From: | ejrx7753 at gmail dot com | Date: | Sat, 04 Feb 2017 10:55:19 +0000 |
| Subject: | Bug #74042 [Opn->Csd]: SORT_NATURAL does not work or pass tests | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-207164@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
User updated by: ejrx7753 at gmail dot com
Reported by: ejrx7753 at gmail dot com
Summary: SORT_NATURAL does not work or pass tests
-Status: Open
+Status: Closed
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
New Comment:
Nevermind. Ignore this report entirely.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[2017-02-04 00:42:59] ejrx7753 at gmail dot com
(fixed package meta)
------------------------------------------------------------------------
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