Bug #3933: strpos doesn't find needle under certain conditions
| From: | wayne at pruvodce dot cz | Date: | Mon, 27 Mar 2000 05:27:58 +0000 |
| Subject: | Bug #3933: strpos doesn't find needle under certain conditions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17272@lists.php.net to get a copy of this message | ||
From: wayne@pruvodce.cz
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)