Jump to content


This topic is now archived and is closed to further replies.


Very large Numbers

Recommended Posts

It seems I've run into quite a problem with the PHP data types. I am doing bitwise shifting and am exceeding the maximum integer size.

for example
$test = (1 << 32); //$test = 64? Should be 4294967296. It clearly exceeded maxint

Even if I had some way to make it unsigned, I still need to push up to around 40 places so I need something that works like a ULONG. Any help would be massively appreciated.

Share this post

Link to post
Share on other sites
Maybe these could help:

[a href=\"http://us2.php.net/manual/en/ref.bc.php\" target=\"_blank\"]http://us2.php.net/manual/en/ref.bc.php[/a]

[a href=\"http://pear.php.net/reference/Math_Integer-latest/Math_Integer/_Math_Integer-0.8_Integer_php.html\" target=\"_blank\"]http://pear.php.net/reference/Math_Integer...nteger_php.html[/a]

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.