(0002364)
|
ferg
|
10-18-07 10:07
|
|
sorry , i omitted it , "^" means xor operation, just like 1 ^ 2 and so on
and my test code below, it got different result in resin 3.1.1 (Within Quercus which support php 5.2.0) and php 5.2.0 which released by www.php.net
<?
phpinfo();
$str1 = 'aaa';
$str2 = '123';
echo strlen($str1).'';
$ctr = 0;
$tmp = '';
for($i = 0;$i < strlen($str1); $i++) {
$ctr = $ctr == strlen($str2) ? 0 : $ctr;
$tmp .= $str2[$ctr].($str1[$i] ^ $str2[$ctr++]);
}
echo $tmp;
?>
Quercus got "112233" while php with apache got "1P2S3R"
maybe it's some kind of bug caused by charset? confused me really, T_T |
|