NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP 64 OR 32 ?


Joined: 09 Nov 2021
Posts: 9
Reply with quote
Hi,

I have the need to run some code in PHP 5.6.40, latest version of 5.6. I have downloaded and installed the NTS X64 version of PHP and it is running fine.

However, if I execute PHP_INT_SIZE I get a value of 4 and not a value of 8, which tells me that I am running 32bit!

If I execute the same code under 7.4 or 8, I get 8, or 64bit.

Can someone please explain why I am getting PHP_INT_SIZE to report 4, when I have installed the x64 version of PHP 5.6.40?

Thanks,
Adri
View user's profileFind all posts by adricistSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8260
Reply with quote
Not it does not mean you're running 32bit version of php. It means you're running php that has 32bit integer values. Both 32 and 64bit versions of php 5.6 for Windows report their INTs are 32bit. Under Linux they report 32bit and 64bit respectively.
And you're correct, in 64bit php-7.x for Windows, INT size is 64bit -- This constant is defined differently in this version and unline php-5.x it does not depend on size of long anymore.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Nov 2021
Posts: 9
Reply with quote
Thank you dmitri, yes, I now understand what is going on! Cheers, Adri
View user's profileFind all posts by adricistSend private message
PHP 64 OR 32 ?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic