Doc #75262 [Opn->Nab]: Round function description (in case of fail)
| From: | requinix@php.net | Date: | Wed, 27 Sep 2017 05:20:57 +0000 |
| Subject: | Doc #75262 [Opn->Nab]: Round function description (in case of fail) | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15000@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75262&edit=1
ID: 75262
Updated by: requinix@php.net
Reported by: vasekdvor at gmail dot com
Summary: Round function description (in case of fail)
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: Any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Read through
http://php.net/manual/en/language.functions.php
http://php.net/manual/en/language.types.type-juggling.php.
Previous Comments:
------------------------------------------------------------------------
[2017-09-26 20:34:27] vasekdvor at gmail dot com
Description:
------------
I find out that there is no documentation about Math function "round()"
, about this situation:
'What will do the round function when there is invalid
entry being passed to a "float $val" ?'.
I think, that in others functions there is always written that if something goes wrong, that
function will result in FALSE.For example floor function contains "This function returns FALSE
in case of an error" in "Return values" section.
I have a script where i am using round function and accidentally happened to me that i (by mistake)
gives that function, an empty variable and after that function has proceeded, i saw that the
returned result is 0.
It's really confusing finding out what function creates this result if you have complex script.
Expected result:
----------------
I think that there should be described what will the function returns if something goes wrong.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75262&edit=1