$dec = 10;
$bin = str_split(decbin($dec));
print_r($bin);
$bin = ['1', '0', '1', '0', '1'];
$count = array_count_values($bin)['1'];
echo $count;
$bin = ['1', '0', '1', '0', '1'];
$str = implode('', $bin);
echo $str;
$bin = ['1', '0', '1', '0', '1'];
$rev_bin = array_reverse($bin);
print_r($rev_bin);
$bin = ['1', '0', '1', '0', '1'];
$key = array_search('1', $bin);
echo $key;