lovespring lovespring - 1 month ago 11
PHP Question

In PHP, what is a binary string (b'xxxx')?

What does

b''
("binary string") mean in the PHP statement
$str=b'xxxxxx';
?

Answer
$number = decbin(59);
echo $number . "\n"; //111011
$number = bindec($number);
echo $number . "\n"; //59

decbin(int $number): Returns a string containing a binary representation of the given number argument.

bindec(string $bstring): Returns the decimal equivalent of the binary number in bstring argument.