php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75262 Round function description (in case of fail)
Submitted: 2017-09-26 20:34 UTC Modified: 2017-09-27 05:20 UTC
From: vasekdvor at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vasekdvor at gmail dot com
New email:
PHP Version: OS:

 

 [2017-09-26 20:34 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-27 05:20 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC