Bug #14714: String tokenizer appears to only work with tokens of size equal to one.

From: Date: Thu, 27 Dec 2001 07:35:26 +0000
Subject: Bug #14714: String tokenizer appears to only work with tokens of size equal to one.
Groups: php.dev 
Request: Send a blank email to php-dev+get-75090@lists.php.net to get a copy of this message
From: s371117@student.uq.edu.au Operating system: linux redhat 7.0 PHP version: 4.1.0 PHP Bug Type: Strings related Bug description: String tokenizer appears to only work with tokens of size equal to one. This code does not appear to work (it is almost a cut and paste from the manual with the token changed). From experimentation I think it is beacause the token is two characters long. I am not sure if this is a bug or a undocumented property of this function. $string = "This is an example string"; $tok = strtok($string,"%s"); while ($tok) { echo "Word=$tok<br>"; $tok = strtok("%s"); } I am sorry I can't be sure of the version of PHP on this server. I only have ftp access. Thanks for such a great product! -- Edit bug report at: http://bugs.php.net/?id=14714&edit=1

« previous php.dev (#75090) next »