Is it possible to get the window processor bit?? I want to find the window processor bit using php?? I have coding to find the operating system and other properties. Kindly
A slightly shorter and more robust way to get the number of bits.
strlen(decbin(~0));
How this works:
The bitwise complement operator, the tilde, ~, flips every bit.
@see http://php.net/manual/en/language.operators.bitwise.php
Using this on 0 switches on every bit for an integer.
This gives you the largest number that your PHP install can handle.
Then using decbin() will give you a string representation of this number in its binary form
@see http://php.net/manual/en/function.decbin.php
and strlen will give you the count of bits.
Here is it in a usable function
function is64Bits() {
return strlen(decbin(~0)) == 64;
}