Easy Tutorial
❮ Func Filesystem Flock Func String Metaphone ❯

PHP bindec() Function

PHP Math Reference Manual

Example

Convert binary to decimal:


Definition and Usage

The bindec() function converts a binary number to a decimal number.

Note: To convert a decimal number to binary, see the decbin() function.


Syntax

Parameter Description
binary_string Required. Specifies the binary string to convert. Note: The parameter value must be a string!

Technical Details

Return Value: The decimal value of binary_string.
Return Type: Float / Integer
--- ---
PHP Version: 4+
--- ---
❮ Func Filesystem Flock Func String Metaphone ❯