title: Generate all binary combinations possible
body: <p>I would like to specify a number of bits, and then get an array containing every possible combination of these bits, in PHP.</p>
  
  <p>Example:</p>
  
  <pre><code>number: 3
  000
  001
  010
  011
  etc...
  </code></pre>
  
  <p>I have tried recursive algorithms which were originally designed for strings, so the algorithm is too slow.</p>
  
  <p>What is the most efficient way to do this?</p>