PHP 8.5.0 Alpha 2 available for testing

Voting

: min(three, eight)?
(Example: nine)

The Note You're Voting On

m0sh at hotmail dot com
16 years ago
@greenone - nice function, thanks. I've adapted it for key usage:

<?php
function bitxor($str, $key) {
$xorWidth = PHP_INT_SIZE*8;
// split
$o1 = str_split($str, $xorWidth);
$o2 = str_split(str_pad('', strlen($str), $key), $xorWidth);
$res = '';
$runs = count($o1);
for(
$i=0;$i<$runs;$i++)
$res .= decbin(bindec($o1[$i]) ^ bindec($o2[$i]));
return
$res;
}
?>

<< Back to user notes page

To Top