<?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>Sat, 25 May 2013 16:21:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Tracking PHP errors]]></title>
      <guid>http://www.phpdeveloper.org/news/15508</guid>
      <link>http://www.phpdeveloper.org/news/15508</link>
      <description><![CDATA[<p>
<i>Till Klampaeckel</i> has put together <a href="http://till.klampaeckel.de/blog/archives/120-Tracking-PHP-errors.html">this new post</a> looking at the <a href="http://us.php.net/manual/en/errorfunc.configuration.php#ini.track-errors">track_errors</a> ini option (that will always put the latest error message in <a href="http://us.php.net/manual/en/reserved.variables.phperrormsg.php">$phperrormsg</a>) and how it can help you more efficiently handle the errors your application throws.
</p>
<blockquote>
track_errors provides the means to catch an error message emitted from PHP. It's something I like to use during the development of various applications, or to get a handle on legacy code. Here are a few examples why!
</blockquote>
<p>
He gives the example of a failed <a href="http://php.net/file_get_contents">file_get_contents</a> that results in a warning. He suggests that, instead of suppressing the error, you set display_errors to "off" and throw an exception when on the failure. There's trade-offs though including the fact that it's in the global scope and additional work would have to be done to handle problems inside other scopes.
</p>]]></description>
      <pubDate>Mon, 29 Nov 2010 13:20:07 -0600</pubDate>
    </item>
  </channel>
</rss>
