#46912 [Opn->Csd]: poorly choosen/ambigous example
| From: | torben@php.net | Date: | Tue, 22 Sep 2009 07:17:02 +0000 |
| Subject: | #46912 [Opn->Csd]: poorly choosen/ambigous example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2800@lists.php.net to get a copy of this message | ||
ID: 46912
Updated by: torben@php.net
Reported By: scott at thebrain dot ca
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-09-22 07:16:42] svn@php.net
Automatic comment from SVN on behalf of torben
Revision: http://svn.php.net/viewvc/?view=revision&revision=288549
Log: Flush out the documentation for strspn() a bit. This an example of
a
very poorly documented function.
Addresses bug #46912
This still needs work.
------------------------------------------------------------------------
[2008-12-19 23:33:00] scott at thebrain dot ca
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...
------------------------------------------------------------------------
[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