<?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 15:31:43 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Travis Swicegood's Blog:  Pushing the boundries of PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8956</guid>
      <link>http://www.phpdeveloper.org/news/8956</link>
      <description><![CDATA[<p>
While working with <a href="http://www.travisswicegood.com/index.php/2007/11/01/pushing_the_boundries_of_php">some code</a> of his, <i>Travis Swicegood</i> noticed something odd when he tried to work with Exceptions in a __destruct call:
</p>
<blockquote>
You must be doing something right when you can send PHP into a tail spin. That or the code you're trying to do is just evil. Turns out __destruct() and __call() don't play well together in 5.2.4 if, and only if, you create an instance of an object without assigning it.
</blockquote>
<p>
The <a href="http://bugs.php.net/bug.php?id=43175">official (and verified) bug</a> over on the bugs.php.net site gets into more detail on it including a code block that illustrates the point as simply as possible.
</p>
<blockquote>
In the example I blogged about, __destruct() actually wants 
to catch any exceptions so it can create meaningful output based on 
the Exceptions that were generated.  In that case, __destruct() would 
have returned peacefully. [...] At any rate, my take on that would be that would still be that if 
__destruct() is finished and an exception is still present, then 
there's an error.  Otherwise, how would you handle things such as 
PDOExceptions thrown during DB clean-up?
</blockquote>]]></description>
      <pubDate>Thu, 01 Nov 2007 16:48:00 -0500</pubDate>
    </item>
  </channel>
</rss>
