I think the general idea of PHP being able to have common integer 64-bit (as opposed to use math packages) is to use 64-bit hardware and 64-bit PHP. Does someone know the specifics? For example, won't the Core2Duo machine be able to support it? What about the 32-bit version of OS like Vista or OS X, can they support it too?
Asked
Active
Viewed 1,064 times
2
-
possible duplicate of [how to have 64 bit integer on PHP?](http://stackoverflow.com/questions/864058/how-to-have-64-bit-integer-on-php) – Lightness Races in Orbit Feb 26 '12 at 15:06
4 Answers
3
- A 32bit OS can't support 64bit software.
- Core2Duo is 64bit (and can also run in 32bit mode)
- There is a PHPx64 Project for windows x64, but I.m not sure if it will give you 64bit integers.

Bob Fanger
- 28,949
- 7
- 62
- 78
-
what is the official 64-bit version of PHP? php.net doesn't seem to have it. – nonopolarity May 15 '09 at 19:28
-
1Jian: there isn't an official 64 bit windows build. Compile your own, or use PHPx64. – Frank Farmer May 15 '09 at 19:43
3
As long as you're on a 64 bit OS, and install 64 bit binaries, you're good to go.
e.g., my dev box is centos, and I installed php-*.x86_64 packages.
When I run:
$ php -r 'echo PHP_INT_MAX;'
I get:
9223372036854775807
If 64 bit binaries aren't available for your platform, apparently there's only one configure option you need to remember while compiling: –with-libdir=/lib64
If you're using windows, there are plenty of resources out there re: 64 bit PHP on Windows.

Frank Farmer
- 38,246
- 12
- 71
- 89
1
You must have 64-bit hardware and 64-bit OS to run PHP in 64-bit. Compiling PHP from source should detect this automatically. If you're installing binaries, they must be compiled as 64-bit, which evidently aren't available from php.net but are available elsewhere on the Internet.
See this related question.