Summary: | некорректная работа с int длиннее 32 бит | ||
---|---|---|---|
Product: | Sisyphus | Reporter: | Nick S. Grechukh <gns> |
Component: | php | Assignee: | Alexey Gladkov <legion> |
Status: | CLOSED NOTABUG | QA Contact: | qa-sisyphus |
Severity: | critical | ||
Priority: | P2 | CC: | hiddenman, lakostis, legion, thresh, vvk |
Version: | unstable | ||
Hardware: | all | ||
OS: | Linux |
Description
Nick S. Grechukh
2005-11-04 22:42:02 MSK
уточнение: раньше php просто обрезал старшие биты, и на это, в частности, закладывается код вычисления контрольной суммы для google rank. 21.11.05 gcc-3.3 был убран из сизифа. Так что делать-то будем? На FreeBSD с gcc > 3.4 все работает. see http://ru.php.net/manual/ru/function.decbin.php: 1) Returns a string containing a binary representation of the given number argument. The largest number that can be converted is 4294967295 in decimal resulting to a string of 32 1's. 2) if you look to source decbin use _php_math_longtobase function where buf type is unsigned long, so negative numbers is impossible ;) So it's a normal that this function doesn't work. |