From: Operating system: Windows 7 PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Bug Bug description:strnatcasecmp treats alphanumeric values before symbols
Description: ------------ --- >From manual page: http://www.php.net/function.strnatcasecmp --- The strnatcasecmp is set that '_' is after letters and numbers which is illogical and should be changed. Test script: --------------- echo strnatcasecmp('1','2');//-1 echo strnatcasecmp('_','2');//1 (incorrect) echo strnatcasecmp('_','a');//1 (incorrect) echo strnatcasecmp('a','b');//-1 echo strnatcasecmp(2,'a');//-1 -- Edit bug report at http://bugs.php.net/bug.php?id=54530&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54530&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54530&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54530&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54530&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54530&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54530&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54530&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54530&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54530&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54530&r=support Expected behavior: http://bugs.php.net/fix.php?id=54530&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54530&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54530&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54530&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54530&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54530&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54530&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54530&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54530&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54530&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54530&r=mysqlcfg