PHP 4.0 Bug #3968: stristr lowercases the original string
| From: | iliaa at home dot com | Date: | Wed, 29 Mar 2000 23:20:56 +0000 |
| Subject: | PHP 4.0 Bug #3968: stristr lowercases the original string | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17365@lists.php.net to get a copy of this message | ||
From: iliaa@home.com
Operating system: Linux 2.2.14
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Misbehaving function
Bug description: stristr lowercases the original string
// Sample error code
$a = "AAbbCCdd";
if( stristr($a, "AA") ) { ... }
echo $a."<br>\n";
// Result
aabbccdd
The only way to avoid this seems to be use
if( stristr($a.'', "AA") ) { ... }