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
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: 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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 14:01:32 2024 UTC