#50883 [Bgs]: PHP x64 has only 32Bit integer
| From: | johannes@php.net | Date: | Fri, 29 Jan 2010 22:43:44 +0000 |
| Subject: | #50883 [Bgs]: PHP x64 has only 32Bit integer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-147056@lists.php.net to get a copy of this message | ||
ID: 50883
Updated by: johannes@php.net
Reported By: virsacer at web dot de
Status: Bogus
Bug Type: Compile Failure
Operating System: win32 only - Windows 7 Pro x64
PHP Version: 5.3.1
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2010-01-29 21:53:11] 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 21:03:53] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50883&edit=1