<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 23:57:41 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Patrick Allaert's Blog: Readable PHP code #1 - Return ASAP]]></title>
      <guid>http://www.phpdeveloper.org/news/11207</guid>
      <link>http://www.phpdeveloper.org/news/11207</link>
      <description><![CDATA[<p>
<i>Patrick Allaert</i> has made <a href="http://patrickallaert.blogspot.com/2008/10/readable-php-code-1-return-asap.html">this recent post</a> to his blog looking at something that a large group of PHP developers seem to forget about - readable PHP code. Specifically, he mentions the "return as soon as possible" mentality.
</p>
<blockquote>
This is the first article of a series I will dedicate to tips to write PHP code that is easier to maintain, review, refactor,... These tips may be applied for other languages but are mainly focused on PHP. The first one could be entitled as "return as soon as possible.
</blockquote>
<p>
He compares a code example - simplifying multiple if/elses, replacing the need for multiple nested evaluations that make the code harder to read. Check out the <a href="http://1.bp.blogspot.com/_BZvUGkpgaiM/SPOF3_AMj6I/AAAAAAAAAFA/DnQqgY_cqlA/s1600-h/diff_2.png">before</a> and <a href="http://2.bp.blogspot.com/_BZvUGkpgaiM/SPOF0mCy3II/AAAAAAAAAE4/9HpsPgnA4NE/s1600-h/diff_1.png">after</a> to see how it helps the flow.
</p>]]></description>
      <pubDate>Tue, 14 Oct 2008 11:14:42 -0500</pubDate>
    </item>
  </channel>
</rss>
