php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54483 Bad returning value explained
Submitted: 2011-04-07 12:59 UTC Modified: 2011-04-08 09:49 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: franverona at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: franverona at gmail dot com
New email:
PHP Version: OS:

 

 [2011-04-07 12:59 UTC] franverona at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.ceil#Description
---

Hello PHP community,

Reading this exactly doc I think that it have an issue relative to description. 
It 
says that 'ceil' function "Returns the next highest integer value by rounding up 
value if necessary", but the definition says that its returns a float number.

"float" ceil ( float $value )

Returns the next highest "integer" value by rounding up value if necessary.

I notice this right now and I want to help you. I hope it helps. Good job :)

Test script:
---------------
It just a text bug; test code is not relevant.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 09:49 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-04-08 09:49 UTC] aharvey@php.net
ceil() really does return a float. The Return Values section of the manual page explains why:

"The return value of ceil() is still of type float as the value range of float is usually bigger than that of integer."

Closing.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 08 16:01:25 2020 UTC