<?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 16:05:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Valgrinding shared modules]]></title>
      <guid>http://www.phpdeveloper.org/news/16689</guid>
      <link>http://www.phpdeveloper.org/news/16689</link>
      <description><![CDATA[<p>
In the process of some development he's been doing on various shared modules for PHP, <i>Derick Rethans</i> <a href="http://derickrethans.nl/valgrinding-shared-modules.html">stumbled across an issue</a> with using <a href="http://valgrind.org/">Valgrind</a> to test his code:
</p>
<blockquote>
While testing whether I correctly free all memory with <a href="http://valgrind.org/">Valgrind</a>, I ran into the issue where I couldn't see the stack frames of where the memory leaks occurred in the extensions, and once I even ran into a <a href="https://bugs.kde.org/show_bug.cgi?id=277045">Valgrind bug</a>. The reason why Valgrind could not show the function names belonging to the stack frames is because PHP had already unloaded the shared extensions from memory.
</blockquote>
<p>
A work-around he found was compiling the modules, but he wanted something "more correct" and less of a hassle. As a result he added a check for the ZEND_DONT_UNLOAD_MODULES environment flag to the PHP core to handles this case specifically. He includes a snippet of example code showing the Valgrind results with and without the flag.
</p>]]></description>
      <pubDate>Mon, 08 Aug 2011 14:35:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tim's Blog: Learn To extract()]]></title>
      <guid>http://www.phpdeveloper.org/news/4691</guid>
      <link>http://www.phpdeveloper.org/news/4691</link>
      <description><![CDATA[On <i>Tim</i>'s blog today (Design by Tim), he has <a href="http://www.designbytim.com/2006/01/18/learn-to-extract/">a new post</a> that talks about "learning to extract()" - using this function to create variables based on $_GET and $_POST entries.
<p>
<quote>
<i>
The days of explicitly declaring variables passed in from a form for use - or (gasp) using $_GET['varName'] in your code is no longer needed! Clear as well as clean code is the discussion for variable setting today, and we get to explore how easy it is to extract(), Typically you would have call the variable and then set it.
<p>
The world is changing. While that is not bad for small forms or simple tasks but what if your project is larger or lets just say after reading this article you abondon gathering all the $_GET data from your simple form?
</i>
</quote>
<p>
He <a href="http://www.designbytim.com/2006/01/18/learn-to-extract/">goes on</a> to talk about the different flags that you can pass in for various options (like "overwrite existing variable" or "prefix variable names with this" sorts of things). Of course, this kind of methodology has to be used carefully so as not to create more security issues than it's worth...]]></description>
      <pubDate>Thu, 19 Jan 2006 07:06:16 -0600</pubDate>
    </item>
  </channel>
</rss>
