#32294 [Opn]: Intval doc doesn't mention return value
| From: | mpr at er dot dtu dot dk | Date: | Sun, 13 Mar 2005 22:26:40 +0000 |
| Subject: | #32294 [Opn]: Intval doc doesn't mention return value | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969366959@lists.php.net to get a copy of this message | ||
ID: 32294
User updated by: mpr at er dot dtu dot dk
Reported By: mpr at er dot dtu dot dk
Status: Open
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
Ooops, "will return -1" should read "will return 0"
Previous Comments:
------------------------------------------------------------------------
[2005-03-13 23:01:56] mpr at er dot dtu dot dk
Description:
------------
Intval documentation doesn't mention what the return value of intval
applied to a non-nummeric string will be. Ie. Doesn't mention that
intval("this is not a number, and can never be interpreted as one");
will return -1.
Furthermore there's quite a few user contributed notes, that deal with
intvals return value being undefined in case of integer overflow. This,
IMHO, should be documented too.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32294&edit=1