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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-27 05:20 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 18:01:30 2024 UTC