decbin('1001') is prefered as decbin(1001).
Because on larger bit string, it may cause problem :
decbin(100000000000000) return 3
else
decbin('100000000000000') return 16384
![]() | bindec说明number bindec ( string binary_string )返回 binary_string 参数所表示的二进制数的十进制等价值。 bindec() 将一个二进制数转换成 integer。可转换的最大的数为 31 位 1 或者说十进制的 2147483647。PHP 4.1.0 开始,该函数可以处理大数值,这种情况下,它会返回 float 类型。
![]()
26-Aug-2004 05:42
decbin('1001') is prefered as decbin(1001).
gwbdome at freenet dot de
20-Aug-2004 05:43
i think a better method than the "shift-method" is my method ^^...
martin at punix dot de
30-May-2003 01:47
## calculate binary with "shift-method" ##
juancri at tagnet dot org
30-Oct-2002 08:16
> The special reason 4 this is:
php at silisoftware dot com
01-Mar-2002 11:16
For converting larger-than-31-bit numbers:
da_he4datthe-gurusdotde
17-Sep-2001 10:11
[Editor's Note:
| ![]() | |