lovespring lovespring - 9 months ago 50
PHP Question

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

What does

("binary string") mean in the PHP statement

Answer Source
$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.