September 2001
Intermediate to advanced
768 pages
32h 45m
English
int bindec(string binary_number) Returns a decimal representation of the binary string passed to it.
Returns:
Decimal integer form of a binary number
Description:
Converts the binary string given by binary_number into its decimal form. The largest decimal value that can be converted is 2147483647, which should be enough for most people.
Version:
PHP 3, PHP 4
See also:
base_convert() dechex() decbin() decoct() hexdec() octdec()
Example:
$number = "101010"; echo "Binary $number is ", bindec($number), "in decimal"; |
Read now
Unlock full access