<?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 19:49:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Stoimen Popov's Blog: PHP: Don't Call the Destructor Explicitly]]></title>
      <guid>http://www.phpdeveloper.org/news/17136</guid>
      <link>http://www.phpdeveloper.org/news/17136</link>
      <description><![CDATA[<p>
In <a href="http://www.stoimen.com/blog/2011/11/14/php-dont-call-the-destructor-explicitly/">this new post</a> to his blog <i>Stoimen Popov</i> talks about calling the "destructor" method of an object and why doing it directly could lead to some issues - like not actually destroying the object before the script ends.
</p>
<blockquote>
At the end of the script the interpreter frees the memory. Actually every object has a built-in destructor, just like it has built-in constructor. So even we don't define it explicitly, the object has its destructor. Usually this destructor is executed at the end of the script, or whenever the object isn't needed anymore. This can happen, for instance, at the end of a function body. Now if we call the destructor explicitly, which as I said I've seen many times, here's what happen. As you can see calling the destructor explicitly doesn't destroy the object. So the question is...how to destroy an object before the script stops?
</blockquote>
<p>
He points out that one way to "destroy" an object is to null it out and remove the structure from memory. This is tricky, though, because a clone of the object will still exist in memory, just not the original.
</p>]]></description>
      <pubDate>Wed, 16 Nov 2011 11:56:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[International PHP Magazine: IPM Poll Question: Which is the Most Common PHP Database Problem?]]></title>
      <guid>http://www.phpdeveloper.org/news/6205</guid>
      <link>http://www.phpdeveloper.org/news/6205</link>
      <description><![CDATA[<p>
The International PHP Magazine has posted <a href="http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26298,nodeid,5.html">the results</a> from their latest poll where they asked their readers "which is the most common PHP database problem?"
</p>
<p>
The options were:
<ul>
<li>Using MySQL directly
<li>Not using auto-increment functionality
<li>Using multiple databases
<li>Not using relations
<li>The n+1 pattern
</ul>
And coming out on top (with 27.5%) was "Not using relations" in the SQL statements made. Following close behind was "Using MySQL directly" and falling in last was "Not using auto-increment functionality".
</p>
<p>
Be sure to vote in <a href="http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26296,nodeid,5.html">this week's poll</a> that asks "Which is Truest?" - given several popular opinions on PHP, pick the one that you think is the most true.
</p>]]></description>
      <pubDate>Wed, 06 Sep 2006 06:53:45 -0500</pubDate>
    </item>
  </channel>
</rss>
