2

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?

nonopolarity
  • 146,324
  • 131
  • 460
  • 740

4 Answers4

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

Community
  • 1
  • 1
scotts
  • 4,027
  • 3
  • 29
  • 26
0

PHP isn't available (from official sources) in 64bit versions.

Ian
  • 24,116
  • 22
  • 58
  • 96