<?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: It&#8217;s Not True that PHP Arrays are Copied by Value</title>
	<atom:link href="/2012/08/17/its-not-true-that-php-arrays-are-copied-by-value/feed/" rel="self" type="application/rss+xml" />
	<link>/2012/08/17/its-not-true-that-php-arrays-are-copied-by-value/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: php novice</title>
		<link>/2012/08/17/its-not-true-that-php-arrays-are-copied-by-value/comment-page-1/#comment-18041</link>
		<dc:creator><![CDATA[php novice]]></dc:creator>
		<pubDate>Mon, 31 Dec 2012 20:45:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=3288#comment-18041</guid>
		<description><![CDATA[Arrays are copied in PHP or? 
&lt;pre lang=&quot;PHP&quot; escape=&quot;true&quot;&gt;
$arr = array(1, 2, 3, 4, 5);

$b = $arr;

print_r($arr);

echo &quot;&quot;;

print_r($b);

echo &quot;&quot;;

$b[0] = &quot;A&quot;;

print_r($arr);

echo &quot;&quot;;

print_r($b);

echo &quot;&quot;;

$c =&#038;$arr;

print_r($arr);

echo &quot;&quot;;

print_r($c);

$c[0] = &quot;A&quot;;

echo &quot;&quot;;

$c =&#038;$arr;

print_r($arr);

echo &quot;&quot;;

print_r($c);
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Arrays are copied in PHP or? </p>
<pre lang="PHP" escape="true">
$arr = array(1, 2, 3, 4, 5);

$b = $arr;

print_r($arr);

echo "";

print_r($b);

echo "";

$b[0] = "A";

print_r($arr);

echo "";

print_r($b);

echo "";

$c =&amp;$arr;

print_r($arr);

echo "";

print_r($c);

$c[0] = "A";

echo "";

$c =&amp;$arr;

print_r($arr);

echo "";

print_r($c);
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis</title>
		<link>/2012/08/17/its-not-true-that-php-arrays-are-copied-by-value/comment-page-1/#comment-17779</link>
		<dc:creator><![CDATA[Luis]]></dc:creator>
		<pubDate>Wed, 12 Dec 2012 18:29:18 +0000</pubDate>
		<guid isPermaLink="false">/?p=3288#comment-17779</guid>
		<description><![CDATA[Thanks for this post. Very interesting. I&#039;d never have guessed that arrays are only copied when one of the referencing variables is changed (if it was not explicitly declared to be a reference with =&#038;, in which case the references would remain the same). Up to this moment, in case it happens, they will reference the same array no matter if I use = or =&#038;

Even though in practice this is transparent to the user, it&#039;s very good to know. Thanks for letting us know it!]]></description>
		<content:encoded><![CDATA[<p>Thanks for this post. Very interesting. I&#8217;d never have guessed that arrays are only copied when one of the referencing variables is changed (if it was not explicitly declared to be a reference with =&amp;, in which case the references would remain the same). Up to this moment, in case it happens, they will reference the same array no matter if I use = or =&amp;</p>
<p>Even though in practice this is transparent to the user, it&#8217;s very good to know. Thanks for letting us know it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: roshan</title>
		<link>/2012/08/17/its-not-true-that-php-arrays-are-copied-by-value/comment-page-1/#comment-16880</link>
		<dc:creator><![CDATA[roshan]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 01:31:02 +0000</pubDate>
		<guid isPermaLink="false">/?p=3288#comment-16880</guid>
		<description><![CDATA[Hi friend

thanks for sharing these.. why don&#039;t  you add some social network sharing widget for your blog]]></description>
		<content:encoded><![CDATA[<p>Hi friend</p>
<p>thanks for sharing these.. why don&#8217;t  you add some social network sharing widget for your blog</p>
]]></content:encoded>
	</item>
</channel>
</rss>
