Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By qqboy on
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
see php bitwise operator
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).