Bug #14774: strpos with strtolower to working incorrectly
| From: | armtuk at yahoo dot com | Date: | Sun, 30 Dec 2001 15:45:01 +0000 |
| Subject: | Bug #14774: strpos with strtolower to working incorrectly | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75357@lists.php.net to get a copy of this message | ||
From: armtuk@yahoo.com
Operating system: Linux 2.4.9-7smp
PHP version: 4.0.6
PHP Bug Type: Unknown/Other Function
Bug description: strpos with strtolower to working incorrectly
<?php
$query="insert into users (user_name) values 'user_name'";
if (strpos(strtolower($query),"select")==0)
{
print "FISH!";
}
?>
Amazingly enough this prints FISH!.
but:
$query="insert into users (user_name) values 'user_name'";
if
(strpos(strtolower($query),"select")==0&&!(strpos(strtolower($query,"select")===FALSE))
{
print "FISH!";
}
does not.
--
Edit bug report at: http://bugs.php.net/?id=14774&edit=1