php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44075 strtok misbehaving
Submitted: 2008-02-08 06:24 UTC Modified: 2008-11-24 19:21 UTC
Votes:4
Avg. Score:3.8 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: jeff76 at operamail dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 6CVS-2008-02-08 (snap) OS: *
Private report: No CVE-ID: None
 [2008-02-08 06:24 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-08 17:27 UTC] felipe@php.net
This occur only in unicode.semantics=1;
 [2008-11-24 19:21 UTC] lbarnaud@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC