<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Swap Variables One Liner</title>
	<atom:link href="http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/</link>
	<description>yes i love technology</description>
	<lastBuildDate>Thu, 08 Jul 2010 02:24:10 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: miah</title>
		<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/comment-page-1/#comment-60670</link>
		<dc:creator>miah</dc:creator>
		<pubDate>Mon, 23 Feb 2009 16:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/#comment-60670</guid>
		<description>$a = &#039;bar&#039;;
$b = &#039;foo&#039;;

$a = $a ^ $b;
$b = $a ^ $b;
$a = $a ^ $b;

echo $a . $b;

// it is faster and needs less memory</description>
		<content:encoded><![CDATA[<p>$a = &#8216;bar&#8217;;<br />
$b = &#8216;foo&#8217;;</p>
<p>$a = $a ^ $b;<br />
$b = $a ^ $b;<br />
$a = $a ^ $b;</p>
<p>echo $a . $b;</p>
<p>// it is faster and needs less memory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aquaricat</title>
		<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/comment-page-1/#comment-36056</link>
		<dc:creator>Aquaricat</dc:creator>
		<pubDate>Fri, 24 Oct 2008 18:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/#comment-36056</guid>
		<description>Doesn&#039;t this just introduce the overhead of creating a temporary array?  If the value of XOR swapping is that it saves memory, wouldn&#039;t doing this just waste double the memory of making a single temporary variable?</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t this just introduce the overhead of creating a temporary array?  If the value of XOR swapping is that it saves memory, wouldn&#8217;t doing this just waste double the memory of making a single temporary variable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swapping values in PHP &#124; Ehsan Akhgari</title>
		<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/comment-page-1/#comment-18896</link>
		<dc:creator>Swapping values in PHP &#124; Ehsan Akhgari</dc:creator>
		<pubDate>Mon, 28 Jul 2008 21:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/#comment-18896</guid>
		<description>[...] It&#039;s always a good thing to search for something cool that you&#039;ve found before blogging it, to make sure that others have not already done the same!&#160; &#160; It even helped me see a PHP trick that should be familiar to seasoned C/C++ programmers... [...]</description>
		<content:encoded><![CDATA[<p>[...] It&#8217;s always a good thing to search for something cool that you&#8217;ve found before blogging it, to make sure that others have not already done the same!&nbsp; &nbsp; It even helped me see a PHP trick that should be familiar to seasoned C/C++ programmers&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swapping Two Variables in One Line With PHP - Ninedays Blog - web development, photography, tutorials and adventure</title>
		<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/comment-page-1/#comment-11098</link>
		<dc:creator>Swapping Two Variables in One Line With PHP - Ninedays Blog - web development, photography, tutorials and adventure</dc:creator>
		<pubDate>Thu, 27 Dec 2007 18:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/#comment-11098</guid>
		<description>[...] And then one day while perusing the internet I found an even easier solution on Optimus Pete - PHP Swap Variables One Liner. [...]</description>
		<content:encoded><![CDATA[<p>[...] And then one day while perusing the internet I found an even easier solution on Optimus Pete &#8211; PHP Swap Variables One Liner. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Simon</title>
		<link>http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/comment-page-1/#comment-7627</link>
		<dc:creator>Mark Simon</dc:creator>
		<pubDate>Wed, 22 Aug 2007 13:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/29/php-swap-variables-one-liner/#comment-7627</guid>
		<description>... except that it makes it easier to write another one-liner like this:

if(whatever) list($a,$b)=array($b,a);</description>
		<content:encoded><![CDATA[<p>&#8230; except that it makes it easier to write another one-liner like this:</p>
<p>if(whatever) list($a,$b)=array($b,a);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
