PHP 5.4 Support for Binary Format PRO

As of PHP 5.4 we can include in our code numbers written in a binary format. We just need to precede these numbers with ‘0b’.

<?
$a = 0b1110; //14
$b = 0b1011; //11
$c = $a & $b; //0b1010
echo $c;
?>

The following video clip shows how this code executes and provides more explanation.

Share:

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences