.


Divya

bindec() Function in PHP with Example


The php bindec() function converts a binary number to a decimal number and its always returns a Float / Integer.

Example

<!DOCTYPE html>
<html>
<body>
<?php
echo bindec("101") . "<br>";
echo bindec("011") . "<br>";
echo bindec("111111") . "<br>";
echo bindec("11100011");
?>
</body>
</html>


.