php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30701 RFE: Option to disable implicit conversion of integers to floats
Submitted: 2004-11-06 15:28 UTC Modified: 2018-05-05 17:41 UTC
Votes:13
Avg. Score:4.8 ± 0.6
Reproduced:9 of 10 (90.0%)
Same Version:8 (88.9%)
Same OS:9 (100.0%)
From: os at sumu dot org Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.0.2 OS: any
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: os at sumu dot org
New email:
PHP Version: OS:

 

 [2004-11-06 15:28 UTC] os at sumu dot org
Description:
------------
PHP implicitly converts integers to floats when they exceed MAX_LONG, making implementing various algorithms in PHP quite difficult.  The change in float-to-integer conversion in version 5.0.2 causes even more grief as floats are now truncated.  An option for letting integers overflow instead of converting them to floats would be great.  Or perhaps a set of functions for doing integer-math.

Related bug reports: #18166, #30233, #30315, #30577, #30598.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-05 17:41 UTC] requinix@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 [2018-05-05 17:41 UTC] requinix@php.net
Old request is old.

See ext/bc and ext/gmp for arbitrary-precision arithmetic.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 08:01:32 2024 UTC