hello every gurus how are you 2017.

i have one question, could you please help:

line 347 menu.inc

elseif ($i < (1 << $length)) {
      // We have exhausted the masks of a given length, so decrease the length.
      --$length;
    }

why say "// We have exhausted the masks of a given length, so decrease the length." ? could some one help to clarify it? thanks.

Comments

mmjvb’s picture

The << is known as the bitwise operator in php. The value of 1 << $length can be calculated as 2 to the power of $length.
So, when $length = 5, the comparison is $i < 32
( 2x2x2x2x2=32).