Exclusive mode seems to work without deadlocks
[mirrors/Programs.git] / php / skripty / xor_8bits.php
CommitLineData
8de51304
H
1<?php\r
2\r
3function xor_bytes ($bina, $binb) {\r
4 $bin = "";\r
5 $x = 8;\r
6 while($x) {\r
7 if ($bina[$x-1] XOR $binb[$x-1])\r
8 { $bin = ( 1 . $bin ); } else { $bin = ( 0 . $bin ); }\r
9 $x--;\r
10 }\r
11 return $bin;\r
12}\r
13\r
14echo xor_bytes("10110000","10010000");\r
15\r
16?>\r
This page took 0.224057 seconds and 4 git commands to generate.