![]() |
What does this symbol do?
PHP Code:
Thanks |
It's the bitwise AND operator: http://php.net/manual/en/language.operators.bitwise.php. $vbulletin->userinfo['permissions']['forumpermissions'] is a number which, when you look at it as a binary value, each bit is the state of one forum permission for that user. $vbulletin->bf_ugp_forumpermissions['custom_perm'] is a "mask" value with only one bit set, the bit corresponding to the "custom_perm" permission (whatever that is). So if you "bitwise AND" those two values, the result will be either 0 or non-zero, depending on whether or not the user has that permission.
Probably that's either too much or not enough of an explanation. If it's not enough, this might help: http://en.wikipedia.org/wiki/Bitmask |
Ahh it's pretty confusing but i think i got an idea of what it does, thanks!
|
Just to confuse you a little more :D ...
A double ampersand "&&" is the same as AND in that code. So it could also appear as this.. PHP Code:
|
Quote:
|
All times are GMT. The time now is 10:23 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|