Strahan Posted May 5, 2009 Share Posted May 5, 2009 Got a problem I'm trying to figure out. I'm looping through a security access control list. A user may match more than one ACL entry so as it goes if a user matches the current ACL entry, it adds to a $rights array the value of the entry (an int to be used in a bitwise AND to determine if the specific right is available). Now at the end I have the array $rights with a random amount of data in it. I want to return whatever value gives the most rights. What I want to do is something akin to return $rights[0] | $rights[1] | $rights[2]; I can easily loop on count($rights) and touch each ACL value, but since the | has to be stacked all at once I'm not sure how can I accomplish that. Any idea? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.