Archive for May 8th, 2007

May 08 2007

Digression into Swaps

Published by Lucello under Geeky

Did you know you can swap the value of two variables without temp??

$a = $a + $b;
$b = $a – $b;
$a = $a – $b;

I wish I were so clever as to come up with that on my own. Still, I post it here to spark the imagination of those who find it as fascinating as I.

;-)

7 responses so far