Help porting c++ to php code
<p>I need if possible port this function to c++:</p>

<pre><code>static unsigned char bux_code[3] = {0xFC, 0xCF, 0xAB};

void bux_convert(char* buf, int size)
{
        int n = 0;
        // ----
        for (n=0;n&lt;size;n++)
        {
                buf[n]^=bux_code[n%3];
        }
}
</code></pre>

<p>What i have done:</p>

<pre><code>$bux_code = array("\xFC", "\xCF", "\xAB");

function bux_convert($string)
{
    $size = strlen($string);

    for ($n = 0; $n &lt; $size; $n++) {
        $string[$n] ^= $bux_code[$n % 3];
    }

    return $string;
}

var_dump ( bux_convert("£Ì•½Ï¼«ü") );
</code></pre>

<p>But i got this error: Cannot use assign-op operators with overloaded objects nor string</p>
