<p>I've tried to do this several times with no luck.  After reading <a href="https://stackoverflow.com/questions/1451/what-is-the-best-way-to-handle-multiple-permission-types#1477">this post</a>, it made me interested in doing this again.  So can anyone tell me why the following doesn't work?</p>

<pre><code>&lt;?php

$guest = 1;
$editor = 2;
$admin = 4;

$user = $editor;

if( $user == ($editor | $admin) ) {
    echo "Test";    
}

?&gt;
</code></pre>

It's been a long time since I used PHP, but I will assume that this will work:
```
```
<?php

    $guest = 1;
    $editor = 2;
    $admin = 4;

    $user = $editor;

    if( ($user == $editor) || ($user == $admin) ) {
        echo "Test";    
    }

?>
```
```