php - How to create a random bit stream
<p>How can I generate following random array:</p>

<pre><code>array(1, 0 , 0, 1, 1, 1, 1, 0, 1, 0, 0)
</code></pre>

<p>with <code>length = n</code>?</p>

<p>Of course, always the <code>for</code> solution is out there. But is there any <strong>One-line</strong> simple solution on this, like any combination of <code>array_fill</code> and <code>mt_rand(0, 1)</code>?</p>