Shekar Iyer wrote:
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
A bit is a bit is a bit. It's not a different size on different systems.
-Stut
--
http://stut.net/
This is a discussion on Bit-size of machine - PHP ; How can one find the bit-size of the system on which PHP is running. php_uname() does not return bit type Thanks Shekar...
How can one find the bit-size of the system on which PHP
is running. php_uname() does not return bit type
Thanks
Shekar
Shekar Iyer wrote:
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
A bit is a bit is a bit. It's not a different size on different systems.
-Stut
--
http://stut.net/
In other words, How do I find if the system on which
PHP is running is 32-bit or 64-bit programmatically?
""Shekar Iyer"" <shekariyer@gmail.com> wrote in message
news:63.6C.17538.74882864@pb1.pair.com...
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
>
> Thanks
> Shekar
Stut wrote:
> Shekar Iyer wrote:
>> How can one find the bit-size of the system on which PHP
>> is running. php_uname() does not return bit type
>
> A bit is a bit is a bit. It's not a different size on different systems.
ho ho ho stut :-)
I think he's looking for the 'word' size of the CPU (32 bit, 64 bit)
you can find out by checking for the largest integer that is supported:
reading here should give you enough info, hopefully:
http://php.net/int
>
> -Stut
>
Shekar Iyer wrote:
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
....also this might be of help: getrandmax()
>
> Thanks
> Shekar
>
Jochem Maas wrote:
> Stut wrote:
>> Shekar Iyer wrote:
>>> How can one find the bit-size of the system on which PHP
>>> is running. php_uname() does not return bit type
>> A bit is a bit is a bit. It's not a different size on different systems.
>
> ho ho ho stut :-)
> I think he's looking for the 'word' size of the CPU (32 bit, 64 bit)
>
> you can find out by checking for the largest integer that is supported:
> reading here should give you enough info, hopefully:
>
> http://php.net/int
Sorry, it's been a literally painful day at work - should've been more
helpful.
-Stut
--
http://stut.net/
Shekar Iyer wrote:
>
> In other words, How do I find if the system on which
> PHP is running is 32-bit or 64-bit programmatically?
>
echo 'This is a ', is_int(2147483647 + 1) ? 64 : 32 , ' bit box';
HTH
--
View this message in context: http://www.nabble.com/Bit-size-of-ma...html#a11329862
Sent from the PHP - General mailing list archive at Nabble.com.
Shekar Iyer wrote:
>
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
>
> Thanks
> Shekar
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
For instance, say you have an AMD 64 Athlon...
You have a CPU that supports 64 bit programming.
In linux type "uname -a". I get the response
"linux localhost.locaoldomain 2.6.21-1.3194.fc7 #1 SMP WED JUNE 28 08:47:03
EDT 2007 x86_64 GNU/LINUX"
The x86_64 shows the "software" kernel supports 64bit programming.
The hardware/software industry is just beginning to move towards 64 bit
programming.
The 'world' is still very much in the 16/32 bit phase.
Just thought this might be of interest to you.
Blessings,
Chetan
--
View this message in context: http://www.nabble.com/Bit-size-of-ma...html#a11335728
Sent from the PHP - General mailing list archive at Nabble.com.
On Wed, June 27, 2007 10:53 am, Shekar Iyer wrote:
> How can one find the bit-size of the system on which PHP
> is running. php_uname() does not return bit type
MAYBE:
<?php
if (0xffffffff + 1 > 0xffffffff){
echo "64-bit";
}
else{
echo "32-bit";
}
?>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?