#42025 [Opn->Fbk]: strpos(); if $needle = '::', can't find string
| From: | jani@php.net | Date: | Wed, 18 Jul 2007 09:10:56 +0000 |
| Subject: | #42025 [Opn->Fbk]: strpos(); if $needle = '::', can't find string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115166@lists.php.net to get a copy of this message | ||
ID: 42025
Updated by: jani@php.net
Reported By: xatyonline at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Strings related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
The expected result is 0 8 8 for your code, so what is the problem?
Previous Comments:
------------------------------------------------------------------------
[2007-07-18 09:01:27] xatyonline at gmail dot com
Description:
------------
strpos($str, $needles, $offset);
if $str haves ':',
if $needles have ':',
then $offset does not have mean.
Reproduce code:
---------------
$str = "::soon::::soon::::soon::";
for($i=0; $i<3; $i++)
{
echo(strpos($str, "::soon::", $i).' ');
}
Expected result:
----------------
Normal
--------------------------------------
0 8 16
result
----------------------------------------
0 8 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42025&edit=1