|  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
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.
Block user comment
Status: Assign to:
Bug Type:
From: franverona at gmail dot com
New email:
PHP Version: OS:


 [2011-04-07 12:59 UTC] franverona at gmail dot com
From manual page:

Hello PHP community,

Reading this exactly doc I think that it have an issue relative to description. 
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-08 09:49 UTC]
-Status: Open +Status: Bogus
 [2011-04-08 09:49 UTC]
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."

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 23:01:23 2021 UTC