#46912 [Opn]: poorly choosen/ambigous example
| From: | scott at thebrain dot ca | Date: | Fri, 19 Dec 2008 23:33:00 +0000 |
| Subject: | #46912 [Opn]: poorly choosen/ambigous example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1651@lists.php.net to get a copy of this message | ||
ID: 46912
User updated by: scott at thebrain dot ca
Reported By: scott at thebrain dot ca
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
Current:
$var = strspn("42 is the answer, what is the question ...",
"1234567890"); will assign 2 to $var...
Span length of 2 can be confused with character data '2'.
Suggestion:
$var = strspn("AB is the answer, what is the question ...",
"ABCDEFGHIJ"); will assign 2 to $var...
Previous Comments:
------------------------------------------------------------------------
[2008-12-19 23:29:10] scott at thebrain dot ca
Description:
------------
Current:
$var = strspn("42 is the answer, what is the question ...",
"1234567890"); will assign 2 to $var...
Index position 2 can be confused with character data '2'.
Suggestion:
$var = strspn("AB is the answer, what is the question ...",
"ABCDEFGHIJ"); will assign 2 to $var...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46912&edit=1