Bug #3556: strcasecmp() compares lengths instead of string contents
| From: | erw dot dongen at wxs dot nl | Date: | Mon, 21 Feb 2000 22:13:39 +0000 |
| Subject: | Bug #3556: strcasecmp() compares lengths instead of string contents | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15762@lists.php.net to get a copy of this message | ||
From: erw.dongen@wxs.nl
Operating system: WIN98
PHP version: 3.0.14
PHP Bug Type: Misbehaving function
Bug description: strcasecmp() compares lengths instead of string contents
// Ran into this when using strcasecmp as user-sort function for usort()
echo strcasecmp("B", "AAA"); // results in -1
// workaround: strcmp( strtolower($a), strtolower($b) )