<?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>Thu, 23 May 2013 14:56:47 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alex Netkachov's Blog: 6 PHP coding tips to write less code]]></title>
      <guid>http://www.phpdeveloper.org/news/8967</guid>
      <link>http://www.phpdeveloper.org/news/8967</link>
      <description><![CDATA[<p>
<i>Alex Netkachov</i> has <a href="http://www.alexatnet.com/node/100">shared six tips</a> in a new post on his blog today for how you can write less PHP code and get more done with it. It's based around <a href="http://www.phpdeveloper.org/news/8961">another post</a> from <i>Arnold Daniels</i> talking about a temporary variable method in PHP.
</p>
<blockquote>
This tip is useful to "lazy" developers who do not even think about variable names. They may prefer magic names like ${0} and 0 is good enough variable name, why not...
</blockquote>
<p>
His <a href="http://www.alexatnet.com/node/100">list</a> consists of:
</p>
<ul>
<li>Use || (or) and && (and) operations instead of if.
<li>Use ternary operator.
<li>Use for instead of while.
<li>In some cases PHP requires you to create a variable. [...] To handle all these situation you can create a set of small functions which shortcuts frequently used operations.
<li>Explore the language you use.
<li>When it is better to write more and then read the code easily, do not be lazy.
</ul>
<p>
Check out <a href="http://www.phpcult.com/blog/02/less-code-vs-good-code/">Vidyut Luther's response</a> to <i>Alex</i>'s comments as well as one from <a href="http://www.phpguru.org/#154">Richard Heyes</a>.
</p>]]></description>
      <pubDate>Mon, 05 Nov 2007 07:58:00 -0600</pubDate>
    </item>
  </channel>
</rss>
