How to use bindec in PHP

This article describe about bindec() Function in PHP.
  • 1280

bindec() Function

For convert binary number to decimal number bindec() function used.

Syntax

bindec(binary_number)

 

Parameter Description
binary number Define the binary number to convert.

Example

<html>
<body>
<?php
echo bindec("0100") . "<br />";
echo bindec("01") . "<br />";
echo bindec("110001111") . "<br />";
echo bindec("1111");
?>
</body>
</html>

 

Output

 

bindecphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.