php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #25317 Would like a 64-bit integer native type
Submitted: 2003-08-29 16:49 UTC Modified: 2005-08-14 19:12 UTC
From: phpbug at paypc dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.3.3 OS: All
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbug at paypc dot com
New email:
PHP Version: OS:

 

 [2003-08-29 16:49 UTC] phpbug at paypc dot com
Description:
------------
This is fairly straightforward.  Right now, native numeric types are float/doubles and 32-bit integers.

Given that > 4GB of memory in a machine is affordable even for the home consumer, it is important to be able to represent exact cardinal values without any floating-point nonsense.

I don't know how much impact this would have the internals of Zend, or performance for that matter.  Non-64-bit-native CPUs could probably adopt optimisations to avoid having to do 64-bit operations on values / expressions where the values are not expected to exceed 32 bits of value, or perhaps, via "type-hinting" by the programmer.

I realise that "bcmath" stuff can handle an effectively infinitely large integer value... but that's really a string-math subsystem with all of the usual limitations (and performance costs).
 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-14 19:12 UTC] nlopess@php.net
duplicate of #11060.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 23:01:33 2025 UTC