Convert binary to decimal:
The bindec() function converts a binary number to a decimal number.
Tip: To convert decimal to binary, look at the decbin() function.
Parameter | Description |
---|---|
binary_string | Required. Specifies the binary string to convert. Note: The parameter value must be a string! |
Return Value: | The decimal value of binary_string |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |