That would only work if the variable were an integer. If I remember
correctly, the variable type was unspecified. ;-)
- Brian
Chris Shiflett wrote:
Your first instinct, make a copy and then reassign the
values, is a straightforward way to do it.
I agree that using xor isn't a very straightforward solution, but I do
like to look for creative, clever solutions:
$foo = $foo + $bar;
$bar = $foo - $bar;
$foo = $foo - $bar;
By the way, I'm hiring. :-)
Chris
--
Thanks!
- Brian Dailey
Software Developer
New York, NY
www.dailytechnology.net
begin:vcard
fn:Brian Dailey
n:Dailey;Brian
org:;Department of Geekery
adr;dom:;;;New York;NY
email;internet:[EMAIL PROTECTED]
title:Senior Software Engineer
tel;home:423 506 0349
x-mozilla-html:FALSE
url:http://dailytechnology.net
version:2.1
end:vcard
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php