In PHP, The decbin() function used for conversion decimal number to binary number.
PHP decbin() Function Example:
In PHP, The decbin() function used for conversion decimal number to binary number.
Syntax:
decbin(decimal_number)
where decimal_number is a decimal number passed as argument in this function.
Example:
<?php $return = decbin(1234567); echo "The value of decbin(1234567) is : " . $return . "<br />"; $return_value = decbin(7890); echo "The value of decbin(7890) is : " . $return_value; ?>
Output:
The value of decbin(1234567) is : 100101101011010000111 The value of decbin(7890) is : 1111011010010
[ 0 ] Comments