<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Resources are passed by reference</title>
	<link>http://www.phpied.com/resources-passed-by-reference/</link>
	<description>Stoyan's blog about (x)html, ajax, bookmarklets, browsers, css, firebug, javascript, json, mdb2, mysql, pear, performance, php, phpbb, tools, yslow, yui, writing, music,... life and everything.</description>
	<pubDate>Sat, 17 May 2008 02:46:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.1</generator>

	<item>
		<title>by: Stoyan</title>
		<link>http://www.phpied.com/resources-passed-by-reference/#comment-185</link>
		<pubDate>Mon, 10 Oct 2005 03:48:06 +0000</pubDate>
		<guid>http://www.phpied.com/resources-passed-by-reference/#comment-185</guid>
					<description>That's right, thanks Marco. I had PHP4 in mind.</description>
		<content:encoded><![CDATA[<p>That's right, thanks Marco. I had PHP4 in mind.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Marco</title>
		<link>http://www.phpied.com/resources-passed-by-reference/#comment-152</link>
		<pubDate>Sun, 02 Oct 2005 22:07:01 +0000</pubDate>
		<guid>http://www.phpied.com/resources-passed-by-reference/#comment-152</guid>
					<description>@Constantine, under PHP5, EVERYTHING is passed by reference unless we explicitly clone something. The great big change we've all been waiting for. I in fact refuse to take the Zend exam until it's PHP5ied because right now it would confuse the hell out of me.

In PHP4, which Stoyan is referring to, a RESOURCE is passed by reference while anything else is passed by value. Try replacing the imagecreate line by $image = &quot;foo&quot;; and the imagedestroy line by unset($image); The copy will still result in a string in the var_dum($copy); line, indicating pass by value.</description>
		<content:encoded><![CDATA[<p>@Constantine, under PHP5, EVERYTHING is passed by reference unless we explicitly clone something. The great big change we've all been waiting for. I in fact refuse to take the Zend exam until it's PHP5ied because right now it would confuse the hell out of me.</p>
<p>In PHP4, which Stoyan is referring to, a RESOURCE is passed by reference while anything else is passed by value. Try replacing the imagecreate line by $image = "foo"; and the imagedestroy line by unset($image); The copy will still result in a string in the var_dum($copy); line, indicating pass by value.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Constantine</title>
		<link>http://www.phpied.com/resources-passed-by-reference/#comment-56</link>
		<pubDate>Thu, 15 Sep 2005 07:52:09 +0000</pubDate>
		<guid>http://www.phpied.com/resources-passed-by-reference/#comment-56</guid>
					<description>under PHP 5.0 and above !</description>
		<content:encoded><![CDATA[<p>under PHP 5.0 and above !
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
