From 25e51e3e37f235887fa7c92be081c3333a4bb47a Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Sun, 16 Dec 2001 10:34:01 +0000 Subject: [PATCH] - Added changed strtok behavior to the manual git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@65267 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/strings.xml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/functions/strings.xml b/functions/strings.xml index a578c963ae..3bdc4ea01b 100644 --- a/functions/strings.xml +++ b/functions/strings.xml @@ -1,5 +1,5 @@ - + String functions Strings @@ -3425,6 +3425,41 @@ while ($tok) { tokenized when any one of the characters in the argument are found. + + The behavior when an empty part was found changed with PHP 4.1.0. The old + behavior returned an empty string, while the new, correct, behavior + simply skips the part of the string: + + Old <function>strtok</function> behavior + + + + + + New <function>strtok</function> behavior + + + + + Also be careful that your tokens may be equal to "0". This evaluates to &false; in conditional expressions.