Using a pow(2) var for error, convert to readable codes
<p>I know it's possible, but it is doing my head in.</p>

<p>Imagine having an array of codes with their description.</p>

<pre><code>array(
0 =&gt; "Success",
1 =&gt; "File Not Found",
2 =&gt; "Could not create file",
4 =&gt; "Directory not found",
8 =&gt; "Directory could not be created",
16 =&gt; "Disk damaged"
)
</code></pre>

<p>(Don't mind the error codes in the example, I just made them up.)</p>

<p>When getting an error code 1 is easy to resolve. 
Now imagine getting an error code which is "7', I need it to return all options within that error code. So 7 is made out of "4 + 2 + 1".</p>

<p>Hope my question is clear. It's almost like putting an error code level in php.
Where it accumulates the errors together.</p>
