php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50883 PHP x64 has only 32Bit integer
Submitted: 2010-01-29 21:03 UTC Modified: 2010-01-29 22:43 UTC
From: virsacer at web dot de Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.1 OS: win32 only - Windows 7 Pro x64
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: virsacer at web dot de
New email:
PHP Version: OS:

 

 [2010-01-29 21:03 UTC] virsacer at web dot de
Description:
------------
I compiled PHP x64 from the Windows Sourcecode but the integer is only 32Bit.

Build Date => Jan 29 2010 13:32:28
Compiler => MSVC9 (Visual C++ 2008)
Architecture => x64
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build"

Reproduce code:
---------------
php.exe -r "echo PHP_INT_MAX;"

Expected result:
----------------
Should be somthing like 9223372036854775807

Actual result:
--------------
2147483647

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-29 21:53 UTC] pajoye@php.net
That's expected, we use a 32bit for integer and unlike other platforms, it is portable (same type won't vary, in C).
 [2010-01-29 22:43 UTC] johannes@php.net
Just to make this clear: "we" means "Windows" in that case, the Windows developers and Visual Studio developers decided to use a 32bit type for representing the "long" data type. Many Unix(-like) operating systems decided to use a 64bit type for "long" on 64bit machines. The C standard allows both. PHP uses whatever the operating system uses. We have plans for a platform independent large integer but that needs some work, maybe it appears some day, maybe not.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jun 19 16:01:23 2021 UTC