php-4.4.1-alt0.cvs20051010 <? echo decbin(-4339167344); ?> возвращает 1000000000000000 та же версия, собранная gcc3.3: <? echo decbin(-4339167344); ?> 11111101010111011000111110010000 php-4.4.1 final release страдает тем же, собранный gcc3.4. предлагается собирать php с gcc 3.3 , как временный workaround
уточнение: раньше 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.