pcthug
03-16-2007, 03:35 AM
Hi, So I'm just wondering how you guys exchange variables? I usually use Temporary Variables and then if they were in the global scope unset them, but I need something more maintainable. Currently I'm using the following though Its quite taxing on server resources
$a = 'World';
$b = 'Hello';
$a ^= $b ^= $a ^= $b;
echo "$a $b"; // Hello World
So does anyone have a better method?
$a = 'World';
$b = 'Hello';
$a ^= $b ^= $a ^= $b;
echo "$a $b"; // Hello World
So does anyone have a better method?