You are here : phpmathbindec

bindec() - math

Returns the decimal equivalent of the binary number represented by
   the binary_string argument.
Parameters :
  • binary_string - The binary string to convert

  • Syntax

    number bindec
         ( string $binary_string
        )


    Example

    <?phpecho bindec('110011') . "\n";echo bindec('000110011') . "\n";echo bindec('111');?>


    Output / Return Value


    Limitations


    Alternatives / See Also


    Reference