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
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:
MUST BE VALID
Solve the problem:
16 - 9 = ?
Subscribe to this entry?

 
 [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-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 19 02:03:37 2021 UTC