note 5537 deleted from function.strtok by nlopess
| From: | nlopess@php.net | Date: | Sun, 08 May 2005 07:43:33 +0000 |
| Subject: | note 5537 deleted from function.strtok by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-89104@lists.php.net to get a copy of this message | ||
Note Submitter: mckay at et dot byu dot edu
----
Note that php's strtok() is NOT the same as the C library function strtok(). From the
documentation on the C library function:
strtok(s1,s2) considers the string s1 to consist of a sequence of
zero or more text tokens separated by spans of one or more
characters from the separator string s2.
Replace "one or more" above with "exactly one" and you'd have a description
of what php's strtok() does. Thus, to php's strtok, "three spaces here" maps
to the tokens "three" "spaces" "" "" "here". The
C library function (much more useful) would map the same string to the tokens "three"
"spaces" "here".
I'm using php version 3.1.12--perhaps this will be changed in later versions