<?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>Weblenium &#187; tips</title>
	<atom:link href="http://www.weblenium.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weblenium.com</link>
	<description></description>
	<lastBuildDate>Mon, 29 Nov 2010 12:31:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>50+ PHP optimisation tips</title>
		<link>http://www.weblenium.com/2009/07/50-php-optimisation-tips/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.weblenium.com/2009/07/50-php-optimisation-tips/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 18:40:18 +0000</pubDate>
		<dc:creator>phorner</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.weblenium.com/?p=516</guid>
		<description><![CDATA[For those of you who program in PHP, this list of PHP optimisation tips is invaluable. It&#8217;s an accumulation of accurate tips and provides references and citations for each and every one.
Some examples:

Use sprintf instead of variables contained in double quotes, it’s about 10x faster.
Use pre-calculations, set the maximum value for your for-loops before and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-518" title="PHP" src="http://www.weblenium.com/wp-content/uploads/2009/07/php.gif" alt="PHP" width="101" height="56" />For those of you who program in PHP, this list of <a href="http://www.hm2k.com/posts/50-php-optimisation-tips-revisited" target="_blank">PHP optimisation tips</a> is invaluable. It&#8217;s an accumulation of accurate tips and provides references and citations for each and every one.</p>
<p>Some examples:</p>
<ol>
<li>Use sprintf instead of variables contained in double quotes, it’s about 10x faster.</li>
<li>Use pre-calculations, set the maximum value for your for-loops before and not in the loop. ie: for ($x=0; $x &lt; count($array); $x), this calls the count() function each time, use $max=count($array) instead before the for-loop starts.</li>
<li>“else if” statements are faster than select statements aka case/switch.</li>
<li>++$i is faster than $ i++, so use pre-increment where possible.</li>
</ol>
<p>&#8230; and many, many others.</p>
<p>I&#8217;ll definitely be applying all of these optimisations to my code in the future.</p>
<p>For more information: <a href="http://www.hm2k.com/posts/50-php-optimisation-tips-revisited" target="_blank">50+ PHP optimisation tips revisited</a></p>
<img src="http://www.weblenium.com/?ak_action=api_record_view&id=516&type=feed" alt="" /><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.weblenium.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.weblenium.com/2009/07/50-php-optimisation-tips/feed/</wfw:commentRss>
		<slash:comments>1163</slash:comments>
		</item>
	</channel>
</rss>

