|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-12-30 10:45 UTC] armtuk at yahoo dot com
<?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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
strpos has a bug. the following statement should give 1, but gives zero: echo strpos(strtolower('C'), 'c');