<?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: Tips for writing compact PHP code</title>
	<atom:link href="http://elbertf.com/2009/03/tips-for-writing-compact-php-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/</link>
	<description>Insights and Updates from a Tech Geek</description>
	<lastBuildDate>Sat, 24 Jul 2010 04:15:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Ozh</title>
		<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/comment-page-1/#comment-43</link>
		<dc:creator>Ozh</dc:creator>
		<pubDate>Tue, 14 Apr 2009 21:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://ElbertF.com/?p=30#comment-43</guid>
		<description>Syntax itself can make things shorter.&lt;br&gt;&lt;br&gt;if (condition)&lt;br&gt;{&lt;br&gt;  do something;&lt;br&gt;}&lt;br&gt;else&lt;br&gt;{&lt;br&gt;  do something else;&lt;br&gt;}&lt;br&gt;&lt;br&gt;is 8 lines, while&lt;br&gt;&lt;br&gt;if (condition) {&lt;br&gt;  do something;&lt;br&gt;} else {&lt;br&gt;  do somerhing else;&lt;br&gt;}&lt;br&gt;&lt;br&gt;is only 5 lines and more readable to me</description>
		<content:encoded><![CDATA[<p>Syntax itself can make things&nbsp;shorter.</p>
<p>if (condition)<br />{<br />  do something;<br />}<br />else<br />{<br />  do something else;<br />}</p>
<p>is 8 lines,&nbsp;while</p>
<p>if (condition) {<br />  do something;<br />} else {<br />  do somerhing else;<br />}</p>
<p>is only 5 lines and more readable to&nbsp;me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svenn</title>
		<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/comment-page-1/#comment-9</link>
		<dc:creator>svenn</dc:creator>
		<pubDate>Sat, 04 Apr 2009 06:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://ElbertF.com/?p=30#comment-9</guid>
		<description>Agree, simply write them in 1 line. $foo = $bar = $foobar = false;&lt;br&gt;Great article Elbert.</description>
		<content:encoded><![CDATA[<p>Agree, simply write them in 1 line. $foo = $bar = $foobar = false;<br />Great article&nbsp;Elbert.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CoenJacobs</title>
		<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/comment-page-1/#comment-6</link>
		<dc:creator>CoenJacobs</dc:creator>
		<pubDate>Wed, 25 Mar 2009 19:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://ElbertF.com/?p=30#comment-6</guid>
		<description>Great article, although I think that some tips aren&#039;t working for me. But most of it should help me to compress the length of my codings. Great blog btw, congrats! I hope to read more from you!</description>
		<content:encoded><![CDATA[<p>Great article, although I think that some tips aren&#39;t working for me. But most of it should help me to compress the length of my codings. Great blog btw, congrats! I hope to read more from&nbsp;you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abi</title>
		<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/comment-page-1/#comment-5</link>
		<dc:creator>Abi</dc:creator>
		<pubDate>Wed, 25 Mar 2009 14:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://ElbertF.com/?p=30#comment-5</guid>
		<description>I&#039;m with Rik, while these are all perfectly capable of making your code more compact there is literally no reason to do so. The goal of good code is to be readable, and while I think most of the tips are perfectly acceptable it might make it harder for someone not as experienced to figure out what&#039;s going on.&lt;br&gt;&lt;br&gt;Though I would like to point out that certain ways of coding are actually faster/more efficient, for instance in example 8 using the code this way..&lt;br&gt;&lt;br&gt;$variable[] = &quot;value1&quot;;&lt;br&gt;$variable[] = &quot;value2&quot;;&lt;br&gt;&lt;br&gt;is slower than doing...&lt;br&gt;&lt;br&gt;$variable ( &#039;value1&#039;, &#039;value2&#039; );&lt;br&gt;&lt;br&gt;&lt;br&gt;Also one tip for writing more readable code is by using switch statements, long if else statements can get messy, use a switch to make it easy and readable</description>
		<content:encoded><![CDATA[<p>I&#39;m with Rik, while these are all perfectly capable of making your code more compact there is literally no reason to do so. The goal of good code is to be readable, and while I think most of the tips are perfectly acceptable it might make it harder for someone not as experienced to figure out what&#39;s going&nbsp;on.</p>
<p>Though I would like to point out that certain ways of coding are actually faster/more efficient, for instance in example 8 using the code this&nbsp;way..</p>
<p>$variable[] = &#8220;value1&#8221;;<br />$variable[] =&nbsp;&#8220;value2&#8221;;</p>
<p>is slower than&nbsp;doing&#8230;</p>
<p>$variable ( &#39;value1&#39;, &#39;value2&#39;&nbsp;);</p>
<p>Also one tip for writing more readable code is by using switch statements, long if else statements can get messy, use a switch to make it easy and&nbsp;readable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rik</title>
		<link>http://elbertf.com/2009/03/tips-for-writing-compact-php-code/comment-page-1/#comment-4</link>
		<dc:creator>Rik</dc:creator>
		<pubDate>Wed, 25 Mar 2009 09:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://ElbertF.com/?p=30#comment-4</guid>
		<description>These are some pretty interesting tips, didn&#039;t know of some they would actually work. But understand that this doesn&#039;t make understanding the code more easy in some cases.  7. for example, when an inexperienced programmer tries to change the value of $bar, this could happen:&lt;br&gt;$foo = &lt;br&gt;$bar = false&lt;br&gt;$foobar = true;&lt;br&gt;&lt;br&gt;But thanks for the tips, because they definitely are usefull!</description>
		<content:encoded><![CDATA[<p>These are some pretty interesting tips, didn&#39;t know of some they would actually work. But understand that this doesn&#39;t make understanding the code more easy in some cases.  7. for example, when an inexperienced programmer tries to change the value of $bar, this could happen:<br />$foo = <br />$bar = false<br />$foobar =&nbsp;true;</p>
<p>But thanks for the tips, because they definitely are&nbsp;usefull!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
