<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Optimus Pete &#187; computer science</title>
	<atom:link href="http://tech.petegraham.co.uk/category/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.petegraham.co.uk</link>
	<description>yes i love technology</description>
	<lastBuildDate>Wed, 25 Aug 2010 10:06:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP: XOR swap</title>
		<link>http://tech.petegraham.co.uk/2007/03/26/php-xor-swap/</link>
		<comments>http://tech.petegraham.co.uk/2007/03/26/php-xor-swap/#comments</comments>
		<pubDate>Mon, 26 Mar 2007 16:25:49 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Website Development]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://tech.petegraham.co.uk/2007/03/26/php-xor-swap/</guid>
		<description><![CDATA[The XOR swap lets you swap the value of integer variables without using a temporary variable, it's also slightly faster.
PLAIN TEXT
PHP:




$x ^= $y;


$y ^= $x;


$x ^= $y; 






I can't actually think of a good reason Why you'd want to use this in PHP since memory isn't normally a big issue, however it might be good [...]]]></description>
			<content:encoded><![CDATA[<p>The XOR swap lets you swap the value of integer variables without using a temporary variable, it's also <a target="_blank" href="http://epsilondelta.net/2006/04/19/php-xor-swap-speed/">slightly faster</a>.</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$x</span> ^= <span style="color:#0000FF;">$y</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$y</span> ^= <span style="color:#0000FF;">$x</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$x</span> ^= <span style="color:#0000FF;">$y</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I can't actually think of a good reason Why you'd want to use this in PHP since memory isn't normally a big issue, however it might be good for showing off <img src='http://tech.petegraham.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>// Pete Graham xXx</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.petegraham.co.uk/2007/03/26/php-xor-swap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

