September 2001
Intermediate to advanced
768 pages
32h 45m
English
string decbin(int dec) Returns the binary representation of the specified decimal integer argument.
Returns:
String binary representation of an integer
Description:
Converts a decimal number into a string containing its binary representation. The largest decimal value that can be converted is 2147483647. If you have to deal with larger numbers, you need to write a custom function to handle the values.
Version:
PHP 3, PHP 4
See also:
base_convert() bindec() dechex() hexdec() decoct() octdec()
Example:
$number = 42; echo "The binary of $number is ", decbin($number); |
Read now
Unlock full access