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
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: 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-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 14:03:36 2021 UTC