php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #7568 64-bit integers, 32-bit unsigned and 64-bit unsigned
Submitted: 2000-11-01 06:44 UTC Modified: 2003-07-18 02:23 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: simon at comsys dot ntu-kpi dot kiev dot ua Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.0.3pl1 OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simon at comsys dot ntu-kpi dot kiev dot ua
New email:
PHP Version: OS:

 

 [2000-11-01 06:44 UTC] simon at comsys dot ntu-kpi dot kiev dot ua
Is it possible to add support of 64-bit integers (signed and unsigned) and 32-bit unsigned integers to PHP?

I use MySQL with BIGINT UNSIGNED fields and it's impossible to read such values from database (I can read them, but can't operate with them). I can't just convert returned string to integers because size of integers in PHP is limmited to 32-bit, and last bit is used for sign. I can write my own functions to work with 64-bit unsigned integers but it should do PHP itself.

Another problem is 32-bit integers. They always are signed integers and it is also hard to work with INT UNSDIGNED fields in database.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-17 16:20 UTC] tomer at parity-bit dot com
Use the bcmath extension if you have it.
 [2003-07-18 02:23 UTC] helly@php.net
PHP is a weak typed language and only supports int and double which are system dependant. If you must ensure a hughe number range then take bcmath as suggested.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC