Syntax Syntax
Parameters Parameters
- $binstring
-
(Required)
- $signed
-
(Optional)
Default value: false
Return Return
(int|float)
Source Source
File: wp-includes/ID3/getid3.lib.php
if ($binstring[0] == '1') { $signmult = -1; } $binstring = substr($binstring, 1); } $decvalue = 0; for ($i = 0; $i < strlen($binstring); $i++) { $decvalue += ((int) substr($binstring, strlen($binstring) - $i - 1, 1)) * pow(2, $i); } return self::CastAsInt($decvalue * $signmult); } /** * @param string $binstring