Bug #3893: strtok can't tok \t\t (2 tabs)

From: Date: Wed, 22 Mar 2000 13:39:47 +0000
Subject: Bug #3893: strtok can't tok \t\t (2 tabs)
Groups: php.dev 
Request: Send a blank email to php-dev+get-17135@lists.php.net to get a copy of this message
From: ttj@mark.ee.nctu.edu.tw Operating system: FreeBSD 3.3R PHP version: 3.0.15 PHP Bug Type: Misbehaving function Bug description: strtok can't tok \t\t (2 tabs) <? //if the following words seperated by 2 continuous TAB char $line="This is a test"; $token=strtok($line,"\t\t"); while($token){ echo "$token<br>"; $token=strtok("\t\t"); } ?> expecting result should be: This is a test but it's not. Though there is other solution to this problem still, str_replace \t\t -> \t or using explode

« previous php.dev (#17135) next »