|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 - 9 = ?
Subscribe to this entry?

 [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: Sun Sep 19 02:03:37 2021 UTC