I have this code:
$a = pack('N',0b00111010000011110101011100100010);
$start = strlen($a)*8 -1;
$str = '';
for($k = $start; $k>=0; $k--) {
$bit = ($a >> $k) & 1;
$str .= $bit;
}
var_dump($str);
output must be this:
00111010000011110101011100100010
but show me this output:
00000000000000000000000000000000
what is wrong in this code ??