Guest User

Untitled

a guest
Jul 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. $perm['a'] = 256;
  2. $perm['b'] = 512;
  3.        
  4. $user = 128;
  5.        
  6. if ($user & $perm['a'])
  7. {
  8.     echo 'ok!';
  9. }
  10.  
  11. // Output - Rien
  12.  
  13. $user = 256;
  14.  
  15. if ($user & $perm['a'])
  16. {
  17.     echo 'ok!';
  18. }
  19.  
  20. // Output - ok!
Add Comment
Please, Sign In to add comment