PHP Looping binary xor
<p>how to looping key as long $text this is my code :</p>

<pre><code>function _xor($text,$key){
    for($i=0; $i&lt;strlen($text); $i++){
        $text[$i] = intval($text[$i])^intval($key[$i]);
    }
    return $text;
}
</code></pre>

<p>result of the above code does not repeat as much as <code>$key</code> length <code>$text</code>.
I want as much as <code>$key</code> in <code>$text</code> and re-XORed
how to repeat?</p>
