Jump to: navigation, search

Php bindec

From w3cyberlearnings

Contents

PHP function bindec

This function converts binary to decimal number.

Syntax bindec

X is a binary and it must be string.

bindec(X);

Example 1

<?php
echo bindec('111');
echo "<br/>";
echo bindec('101');
echo "<br/>";
echo bindec('110');

?>

Output

7
5
6


Related Links


Navigation
Web
SQL
MISC
References