<?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, 19 Jun 2013 10:53:41 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Exceptional PHP: Nesting Exceptions In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/13526</guid>
      <link>http://www.phpdeveloper.org/news/13526</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> continues his introductory series on exception handling in PHP with <a href="http://www.brandonsavage.net/exceptional-php-nesting-exceptions-in-php/">this new post</a> to his blog. This time the focus is on methods for nesting exceptions.
</p>
<blockquote>
In the <a href="http://www.brandonsavage.net/exceptional-php-introduction-to-exceptions/">last two</a> <a href="http://www.brandonsavage.net/exceptional-php-extending-the-base-exception-class">entries</a> we have talked about the concept of <a href="http://en.wikipedia.org/wiki/Principle_of_abstraction">layer abstraction</a>: that is, that exceptions should not be allowed to pass out of one layer and into another. So, when an exception is raised in the database layer it should be caught in the controller. But how do we go about making sure that exceptions raised in the database layer are properly recorded and processed, ensuring that we have error logging and don't simply silence our exceptions?
</blockquote>
<p>
He looks first at general exception nesting then at extending the base Exception class to write more nested code (inside a class). He also touches on the <a href="http://www.php.net/manual/en/language.exceptions.extending.php">nested exceptions</a> that were included in the latest release of the PHP 5.3 series.
</p>]]></description>
      <pubDate>Thu, 12 Nov 2009 12:43:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Mark van der Velden's Blog: PHP Quiz part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/12514</guid>
      <link>http://www.phpdeveloper.org/news/12514</link>
      <description><![CDATA[<p>
<i>Mark van der Velden</i> has posted <a href="http://blog.dynom.nl/archives/PHP-Quiz-part-2_20090514_27.html">another PHP quiz</a> you can used to test your knowledge of the language:
</p>
<blockquote>
A short quiz this time, but that doesn't make it less fun. Do you know the answer to all of them? Get a cup of coffee and kill 10 minutes with round two... As always, think of the answer before you execute the code or look it up. You can find round one <a href="http://blog.dynom.nl/archives/PHP-Quiz-part-1_20080424_23.html">here</a>.
</blockquote>
<p>
This one has questions on arrays, ArrayAccess, references, operator precedence and nesting structures. There's no answer key, so you'll just have to test it out if you want to see the answer.
</p>]]></description>
      <pubDate>Thu, 14 May 2009 12:05:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Lord's Blog: PHP 5.2 - Nesting level too deep - recursive dependency?]]></title>
      <guid>http://www.phpdeveloper.org/news/6691</guid>
      <link>http://www.phpdeveloper.org/news/6691</link>
      <description><![CDATA[<p>
So, you've just upgraded to <a href="http://www.php.net/downloads.php">PHP 5.2</a> and all is going well until you come across a page in your application that gives the message "Nesting level too deep - recursive dependency?". With such a vague error message, you might have trouble locating the source of the problem. Thankfully, someone's already been there and <a href="http://www.bigroom.co.uk/blog/php-nesting-level-too-deep-recursive-dependency/">figured out the issue</a> - <i>Richard Lord</i>.
</p>
<blockquote>
I installed PHP 5.2 on one of my testing servers today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was "Nesting level too deep - recursive dependency?" and it took a little time to track down the root of the problem. Here's what I'd done wrong.
</blockquote>
<p>
Basically, his problem was using the "non-strict" evaluation for checking if two objects were equal to each other (== instead of ===). This compares everything about them, down to the properties - even if they're references to other properties inside of the same class (which is where the problem lies).
</p>
<p>
So, the fix is simple - === instead of == when comparing those objects. You'll be happier for the change.
</p>]]></description>
      <pubDate>Mon, 13 Nov 2006 10:02:00 -0600</pubDate>
    </item>
  </channel>
</rss>
