Definition: The Decbin () PHP Function is used to convert a decimal into a binary number. This is the opposite of Bindec () which is used to convert a binary number into a decimal.
Also Known As: Decimal to Binary
Examples:
1
1100100
1100
110101111101
<?phpThis returns the following binary:
echo(decbin(1) . "<br />");
echo(decbin(100) . "<br />");
echo(decbin(12) . "<br />");
echo(decbin(3453) . "<br />");
?>
1
1100100
1100
110101111101

