Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002071 [Quercus] minor always 10-16-07 10:55 10-18-07 13:32
Reporter ferg View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0002071: Check "^" operator
Description (rep by Leo)

when i was tring to move a php application to Resin, i got some error, finally i found i found this question, the result of "^" is different, who can tell me why? and is this my misconfigurature?
any help will be appreciated .
Additional Information
Attached Files

- Relationships

- Notes
(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
 
(0002366)
nam
10-18-07 13:32

php/0383
php/3383
 

- Issue History
Date Modified Username Field Change
10-16-07 10:55 ferg New Issue
10-18-07 10:07 ferg Note Added: 0002364
10-18-07 12:53 nam Status new => assigned
10-18-07 12:53 nam Assigned To  => nam
10-18-07 13:32 nam Status assigned => closed
10-18-07 13:32 nam Note Added: 0002366
10-18-07 13:32 nam Resolution open => fixed
10-18-07 13:32 nam Fixed in Version  => 3.1.4


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker