getid3_lib::Dec2Bin()public staticWP 1.0

{} Это метод класса: getid3_lib{}

Хуков нет.

Возвращает

Строку.

Использование

$result = getid3_lib::Dec2Bin( $number );
$number(int) (обязательный)
-

Код getid3_lib::Dec2Bin() WP 6.0

public static function Dec2Bin($number) {
	if (!is_numeric($number)) {
		// https://github.com/JamesHeinrich/getID3/issues/299
		trigger_error('TypeError: Dec2Bin(): Argument #1 ($number) must be numeric, '.gettype($number).' given', E_USER_WARNING);
		return '';
	}
	$bytes = array();
	while ($number >= 256) {
		$bytes[] = (int) (($number / 256) - (floor($number / 256))) * 256;
		$number = floor($number / 256);
	}
	$bytes[] = (int) $number;
	$binstring = '';
	foreach ($bytes as $i => $byte) {
		$binstring = (($i == count($bytes) - 1) ? decbin($byte) : str_pad(decbin($byte), 8, '0', STR_PAD_LEFT)).$binstring;
	}
	return $binstring;
}