Big numbers
| From: | Stanislav Malyshev | Date: | Wed, 11 Oct 2000 14:53:26 +0000 |
| Subject: | Big numbers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34675@lists.php.net to get a copy of this message | ||
We have now several reports in our bugs DB on how PHP handles large
numbers.
Basically, when number does not fit the unsigned long, it is
converted to float. The problem is that when integer operation (like &, ^
or even sprintf("%d") is attempted, the number is silently and wrongly
converted back to integer, giving bogus results. Anybody has any
explanations on the reasons of such a behavious and any ideas of how to
fix it? This is really bad because this all happens "under the carpet" and
only thing you know that you suddently start having bogus result.
--
Stanislav Malyshev stas@zend.com http://www.zend.com/
+972-3-6139665 ext.106