nonopolarity
nonopolarity

Reputation: 151036

what are the specifics of setting up PHP so that integers will be 64-bit?

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?

Upvotes: 2

Views: 1100

Answers (4)

Ian
Ian

Reputation: 25336

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

Upvotes: 0

scotts
scotts

Reputation: 4097

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.

Upvotes: 1

Frank Farmer
Frank Farmer

Reputation: 39356

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.

Upvotes: 3

Bob Fanger
Bob Fanger

Reputation: 29897

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

Upvotes: 3

Related Questions