<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Neat PHP Tricks: How To Assign References to Globals</title>
	<atom:link href="http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/</link>
	<description>Look! Bunnies!</description>
	<lastBuildDate>Wed, 08 Sep 2010 15:09:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: pestaa</title>
		<link>http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/comment-page-1/#comment-4913</link>
		<dc:creator>pestaa</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.otton.org/?p=295#comment-4913</guid>
		<description>You&#039;re welcome. :) We&#039;re in that lucky situation that PHP is really well-documented. Always refer to there to figure out strange behaviors.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome. :) We&#8217;re in that lucky situation that PHP is really well-documented. Always refer to there to figure out strange behaviors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Otton</title>
		<link>http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/comment-page-1/#comment-4912</link>
		<dc:creator>David Otton</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:23:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.otton.org/?p=295#comment-4912</guid>
		<description>pestaa: I think that&#039;s a pretty clear explanation of what&#039;s going on, thanks.</description>
		<content:encoded><![CDATA[<p>pestaa: I think that&#8217;s a pretty clear explanation of what&#8217;s going on, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pestaa</title>
		<link>http://www.otton.org/2008/11/09/neat-php-tricks-assign-references-globals-workaround/comment-page-1/#comment-4911</link>
		<dc:creator>pestaa</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.otton.org/?p=295#comment-4911</guid>
		<description>In your first script, &quot;global $obj;&quot; creates a reference, that attaches $obj to $GLOBAL[&quot;obj&quot;]; .
When you perform the following action, you redefine local $obj variable to be a reference of a newly created stdClass. In this case, your global variable isn&#039;t touched at all. That is the expected way, and PHP just does it well.

(Of course, in the second example, you directly rewrite the global var, explicitly create a reference to a stdClass.)

Hope this helps. However, if I have misunderstood something, correct me please.</description>
		<content:encoded><![CDATA[<p>In your first script, &#8220;global $obj;&#8221; creates a reference, that attaches $obj to $GLOBAL["obj"]; .<br />
When you perform the following action, you redefine local $obj variable to be a reference of a newly created stdClass. In this case, your global variable isn&#8217;t touched at all. That is the expected way, and PHP just does it well.</p>
<p>(Of course, in the second example, you directly rewrite the global var, explicitly create a reference to a stdClass.)</p>
<p>Hope this helps. However, if I have misunderstood something, correct me please.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
