<?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>Sun, 19 May 2013 15:52:09 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Debugging Variables]]></title>
      <guid>http://www.phpdeveloper.org/news/15884</guid>
      <link>http://www.phpdeveloper.org/news/15884</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post to his blog today looking at a way you can dig inside of a variable that might be causing you trouble with the <a href="http://derickrethans.nl/debugging-variables.html">help of the debug_zval_dump method</a> - a PHP function that dumps a string representation of an internal zend value directly to the standard output method (usually an "echo").
</p>
<blockquote>
The internal representation of a PHP variable container (called zval), contains the type and value of a variable, but also whether it is a reference and what its refcount is. Due to PHP's copy-on-write policy, one specific zval container can be used by multiple variables at the same time as we will see in a bit.
</blockquote>
<p>
He talks about what the "refcount" field of a variable means and some simple examples showing a single reference, more than one symbols and how PHP handles a "split upon assignment". He also mentions Xdebug's method <a href="http://xdebug.org/docs/all_functions#xdebug_debug_zval">xdebug_debug_zval</a> that takes in a variable name rather than the variable itself.
</p>]]></description>
      <pubDate>Thu, 10 Feb 2011 09:26:18 -0600</pubDate>
    </item>
  </channel>
</rss>
