xorswap
<?php
$a = “pippo”;
$b = “pluto”;
echo “a e’ uguale a $a\n”;
echo “b e’ uguale a $b\n”;
echo “-------------\n”;
$a = $a ^ $b;
$b = $b ^ $a;
$a = $a ^ $b;
echo “a e’ uguale a $a\n”;
echo “b e’ uguale a $b\n”;
?>
You must log in or register to comment.