[PHP-DEV] Bug #3933: strpos doesn't find needle under certain conditions From: wayne <email protected>
Date: 03/27/00

From: wayne <email protected>
Operating system: Linux
PHP version: 3.0.15
PHP Bug Type: Misbehaving function
Bug description: strpos doesn't find needle under certain conditions

<?
if(strpos("bleble","ble",0)==false) echo("strpos has a bug!(1)\n");
if(strpos("bleble","ble",-1)==false) echo("strpos has a bug!(2)\n");
if(strpos("bleble","ble")==false) echo("strpos has a bug!(3)\n");
if(strpos("blebla","ble")==false) echo("strpos has a bug!(4)\n");
if(strpos("blable","ble")!=false) echo("now it works, weird ...\n");
if(strpos("xbleble","ble",0)!=false) echo("now it works, weird ...\n");
?>

(My friend found a bug in my template engine ... i'm pretty sure that this is the problem)

-- 
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>