i'm new here and i have a question that i couldn't find an answer to:
<?php
$val1 = 25;
$val2 = 15;
echo ($value & $value1); // output : 9
?>
Can anyone explain step by step how this returned 9 ?
Thank you
i'm new here and i have a question that i couldn't find an answer to:
<?php
$val1 = 25;
$val2 = 15;
echo ($value & $value1); // output : 9
?>
Can anyone explain step by step how this returned 9 ?
Thank you
&
operator works with binary representation of a number:
25
is 00011001
15
is 00001111
00011001
&
00001111
--------
00001001
Which is 9
in decimal.