<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: PHP Optimization &#8211; Good Coding Practice</title>
	<atom:link href="http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/feed/" rel="self" type="application/rss+xml" />
	<link>http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/</link>
	<description>Live it up, life is way too short to be "bored"!</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:31:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ries van Twisk</title>
		<link>http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/#comment-170</link>
		<dc:creator>Ries van Twisk</dc:creator>
		<pubDate>Sun, 10 Jan 2010 12:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://pucadinga.wordpress.com/?p=87#comment-170</guid>
		<description>Althougbh it&#039;s nice to know what functions are faster then other similar functions.
I am a strong believer that people shouldn&#039;t do this micro optimalisations (unless you really really really have to).

Micro optimalisations are best handled and solved during compiling and interpreting of code, and not by humans.
As you can clearly see of some example (not all) they make code pretty much unreadable.

I find that the following arguments mentioned above are bogus event:
- date(‘U’) v.s. time() : Both functions do something different
- if(false &amp;&amp; true) as oppose to if(true &amp;&amp; false) : This is obvious because when the code sees fails he will not do any more if evaluations. It&#039;s like saying that two time print is slower then one times print ...;
- Error suppression (using @) v.s. no error suppression : Under some situations you have to do that, unless you want to use a fancy try/catch or if/then the solve it... which make the version without @ slower anyways and the slowness comes really from the reporting itself then the @. In production you would set error_reporting(0) anwyays
- The example given in strlen() v.s. isset(): isset() is faster!  is weird, it makes code unreadable, interesting code though... but unreadable.
- Pre-increment v.s. post-increment: pre-increment is faster!  They do different things and sometimes you need one or the other, unless you are simply looping.

anyways.... zend should fix the compiler for some of the mentioned items :)</description>
		<content:encoded><![CDATA[<p>Althougbh it&#8217;s nice to know what functions are faster then other similar functions.<br />
I am a strong believer that people shouldn&#8217;t do this micro optimalisations (unless you really really really have to).</p>
<p>Micro optimalisations are best handled and solved during compiling and interpreting of code, and not by humans.<br />
As you can clearly see of some example (not all) they make code pretty much unreadable.</p>
<p>I find that the following arguments mentioned above are bogus event:<br />
- date(‘U’) v.s. time() : Both functions do something different<br />
- if(false &amp;&amp; true) as oppose to if(true &amp;&amp; false) : This is obvious because when the code sees fails he will not do any more if evaluations. It&#8217;s like saying that two time print is slower then one times print &#8230;;<br />
- Error suppression (using @) v.s. no error suppression : Under some situations you have to do that, unless you want to use a fancy try/catch or if/then the solve it&#8230; which make the version without @ slower anyways and the slowness comes really from the reporting itself then the @. In production you would set error_reporting(0) anwyays<br />
- The example given in strlen() v.s. isset(): isset() is faster!  is weird, it makes code unreadable, interesting code though&#8230; but unreadable.<br />
- Pre-increment v.s. post-increment: pre-increment is faster!  They do different things and sometimes you need one or the other, unless you are simply looping.</p>
<p>anyways&#8230;. zend should fix the compiler for some of the mentioned items <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andres</title>
		<link>http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/#comment-105</link>
		<dc:creator>Andres</dc:creator>
		<pubDate>Sun, 21 Jun 2009 13:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://pucadinga.wordpress.com/?p=87#comment-105</guid>
		<description>There&#039;s something wrong in this one:

casting v.s. intval(): casting is faster!
Same benchmark as above, results:
casting: 0.0665502957
intval(): 0.011689375 

If intval() is executed in less time, why do you say that casting is faster?</description>
		<content:encoded><![CDATA[<p>There&#8217;s something wrong in this one:</p>
<p>casting v.s. intval(): casting is faster!<br />
Same benchmark as above, results:<br />
casting: 0.0665502957<br />
intval(): 0.011689375 </p>
<p>If intval() is executed in less time, why do you say that casting is faster?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pucadinga</title>
		<link>http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/#comment-43</link>
		<dc:creator>pucadinga</dc:creator>
		<pubDate>Thu, 04 Dec 2008 08:07:26 +0000</pubDate>
		<guid isPermaLink="false">http://pucadinga.wordpress.com/?p=87#comment-43</guid>
		<description>Off course, no problem!  Glad you like it! :)</description>
		<content:encoded><![CDATA[<p>Off course, no problem!  Glad you like it! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james</title>
		<link>http://pucadinga.com/2008/10/14/php-optimization-good-coding-practice/#comment-42</link>
		<dc:creator>james</dc:creator>
		<pubDate>Thu, 04 Dec 2008 06:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://pucadinga.wordpress.com/?p=87#comment-42</guid>
		<description>Nice post you have here - I&#039;ve been searching for a echo vs print but found alot more in here. Nice job you&#039;ve done. Can I borrow this article from you with pingback of course?</description>
		<content:encoded><![CDATA[<p>Nice post you have here &#8211; I&#8217;ve been searching for a echo vs print but found alot more in here. Nice job you&#8217;ve done. Can I borrow this article from you with pingback of course?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
