Is it possible to identify Linux 32 or 64 bit, using PHP?
phpinfo()
returns
Linux infong 2.4 #1 SMP Mon Oct 10 09:34:36 UTC 2011 i686 GNU/Linux
It’s shared hosting so I cant use command line.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do a simple test:
For 32-bit environment it will return false as this number is much bigger that maximum 32-bit integer. For 64-bit environment it will return true.
Or use PHP_INT_MAX as mario suggested in comments.
Or use PHP_INT_SIZE: