In PHP, The bindec() function used for conversion binary number to decimal number.
PHP bindec() Function Example:
In PHP, The bindec() function used for conversion binary number to decimal number.
Syntax:
bindec(binary_number)
binary_number is a binary number argument parameter for this function.
Example:
<?php $return = bindec(10010101); echo "The value of bindec(10010101) is : " . $return . "<br />"; $return_value1 = bindec(111); echo "The value of bindec(111) is : " . $return_value1; ?>
Output:
The value of bindec(10010101) is : 149 The value of bindec(111) is : 7
[ 0 ] Comments