<?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 08:10:19 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Brian Moon's Blog: Initializing & typing variables with settype()]]></title>
      <guid>http://www.phpdeveloper.org/news/6269</guid>
      <link>http://www.phpdeveloper.org/news/6269</link>
      <description><![CDATA[<p>
In <a href="http://doughboy.wordpress.com/2006/09/14/initializing-typing-variables-with-settype/">his latest post</a>, <i>Brian Moon</i> talks about a method to help you and your code fit into an E_STRICT style of coding - the <a href="http://www.php.net/settype">settype function</a>.
</p>
<blockquote>
These days, the way to develop is to have E_ALL and maybe even throw in E_STRICT if you are really hard core. That of course means having all your variables initialized before they are used.
</blockquote>
<p>
In <a href="http://doughboy.wordpress.com/2006/09/14/initializing-typing-variables-with-settype/">his view</a>, defining them is good, but it's more "elegant" to use the settype function to make it more clear where they are defined. He also includes a function, using settype, that ensures that the entered values are what they should be (i.e. and int is an int).
</p>]]></description>
      <pubDate>Thu, 14 Sep 2006 07:01:47 -0500</pubDate>
    </item>
  </channel>
</rss>
