Bug #14714 Updated: String tokenizer appears to only work with tokens of size equal to one.
| From: | elixer@php.net | Date: | Sat, 05 Jan 2002 00:03:34 +0000 |
| Subject: | Bug #14714 Updated: String tokenizer appears to only work with tokens of size equal to one. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-75911@lists.php.net to get a copy of this message | ||
ID: 14714
Updated by: elixer
Reported By: s371117@student.uq.edu.au
Status: Open
Bug Type: Strings related
Operating System: linux redhat 7.0
PHP Version: 4.1.0
New Comment:
Please create a php file with the following content, the version number
of PHP will appear in the output:
<?php
phpinfo();
?>
Let us know what version you are on.
Sean
Previous Comments:
------------------------------------------------------------------------
[2001-12-27 02:35:26] s371117@student.uq.edu.au
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 this bug report at http://bugs.php.net/?id=14714&edit=1