<?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 12:22:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Debuggable Blog: Supressing Errors in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11848</guid>
      <link>http://www.phpdeveloper.org/news/11848</link>
      <description><![CDATA[<p>
<i>Felix Geisendorfer</i> has posted two new items to the Debuggable blog looking at suppressing errors in your applications - and no, that doesn't mean <a href="http://www.phpdeveloper.org/news/11672">using the @ operator</a> either.
</p>
<blockquote>
As of late I am getting sick of some best practices I have taught myself. Never using the @-error suppressing operator quickly moving to the top of the list. Before you start crying out loud (I know you will), let me say this: I do not mean to encourage anybody to use the @-operator. Applying the practice herein introduced may result in permanent damage to your coding habits and could serve as a gateway behavior to writing shitty code.
</blockquote>
<p>
He gives an example in the <a href="http://debuggable.com/posts/suppressing-php-errors-for-fun-and-profit">first post</a> of a place where he failed to properly check to ensure an element existed before checking a element of it. The <a href="http://debuggable.com/posts/suppressing-suppressing-php-errors-with-emptiness">second post</a> provides an interesting solution to the same problem - using <a href="http://php.net/empty">empty</a> on the element/subelement to check its existence.
</p>]]></description>
      <pubDate>Fri, 30 Jan 2009 11:14:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Five reasons why the shut-op operator (@) should be avoided]]></title>
      <guid>http://www.phpdeveloper.org/news/11672</guid>
      <link>http://www.phpdeveloper.org/news/11672</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has posted <a href="http://derickrethans.nl/five_reasons_why_the_shutop_operator_@_should_be_avoided.php">just a few of the reasons</a> why the "shut-up operator" (the @ symbol) should be avoided at all costs in your PHP applications.
</p>
<blockquote>
The @-operator is often used to silence errors in noisy PHP functions'"functions that generate warnings that can not be easily prevented. [...] In those cases, there is no way how to check up-front whether the function call will not issue a warning when being called.
</blockquote>
<p>
There are side effects to using the operator, however, including hiding legitimate errors and making debugging that much more difficult. To back up his point, he includes four other reasons to avoid the operator's use (besides the debugging issues):
</p>
<ul>
<li>It's slow (part 1)
<li>It's slow (part 2)
<li>It's slow (part 3: It generates crappier code)
<li>Apfelstrudels were harmed (related to the strudel_token in the C code for the operator)
</ul>]]></description>
      <pubDate>Mon, 05 Jan 2009 12:09:37 -0600</pubDate>
    </item>
  </channel>
</rss>
