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
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
27 - 10 = ?
Subscribe to this entry?

 
 [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 06:01:32 2024 UTC