#44075 [Opn->Ver]: strtok misbehaving
| From: | felipe@php.net | Date: | Fri, 08 Feb 2008 17:27:05 +0000 |
| Subject: | #44075 [Opn->Ver]: strtok misbehaving | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122095@lists.php.net to get a copy of this message | ||
ID: 44075
Updated by: felipe@php.net
Reported By: jeff76 at operamail dot com
-Status: Open
+Status: Verified
Bug Type: Strings related
Operating System: FreeBSD
PHP Version: 6CVS-2008-02-08 (snap)
Previous Comments:
------------------------------------------------------------------------
[2008-02-08 06:24:02] jeff76 at operamail dot com
Description:
------------
strtok is misbehaving in 6 snap., or at least not consistent with the
behavior in PHP version 5.
Reproduce code:
---------------
$chaine='1-2';
$a=strtok($chaine,'-');
$b=strtok(' ');
echo($a.' then '.$b);
Expected result:
----------------
1 then 2
Actual result:
--------------
1 then -2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44075&edit=1