Convert Binary String to Decimal Number using PHP

bindec function

<?php

$binaryString = '10100';
$decimalNumber = bindec($binaryString);

echo $decimalNumber;

Leave a Comment

Cancel reply

Your email address will not be published.