:45160825
Solution to your question:
function bit_get($bitmask, $bit){
return ($bitmask >> ($bit - 1)) & 1;
}
$string = "a";
$len = strlen($string);
for($i = 0; $i < $len; ++$i){
$c = ord($string[$i]);
echo bit_get($c, 8);
echo bit_get($c, 7);
echo bit_get($c, 6);
echo bit_get($c, 5);
echo bit_get($c, 4);
echo bit_get($c, 3);
echo bit_get($c, 2);
echo bit_get($c, 1);
}