Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2001122

[PHP-DEV] Bug #14774 Updated: strpos with strtolower to working incorrectly From: mfischer <email protected>
Date: 12/30/01

ID: 14774
Updated by: mfischer
Reported By: armtuk <email protected>
Old Status: Open
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux 2.4.9-7smp
PHP Version: 4.0.6
New Comment:

Thats the documented and expected behaviour.

Previous Comments:
------------------------------------------------------------------------

[2001-12-30 10:45:00] armtuk <email protected>

<?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 this bug report at http://bugs.php.net/?id=14774&edit=1

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>