confusion between lazy copying and lazy loading
<p>Does PHP provide any <b>Lazy copy</b> concept?</p>

<p>My believe is that Lazy copy is not implemented in PHP(infact is it a correct terminology?) while <b>Lazy loading</b> can be implement on object properties by simple flag property of an object.</p>

<p>I came across a <a href="http://stackoverflow.com/questions/746224/are-there-pointers-in-php">answer(Please see)</a> on SO with a large number of upvote, a part of explanation seems to be completely wrong.</p>

<p>He is saying unless $b is not changed $a will keep only reference of $b.</p>

<pre><code>$b=3;
$a=$b;
// $a points to $b, equals to $a=&amp;$b 
$b=4;
// now PHP will copy 3 into $a, and places 4 into $b
</code></pre>

<p>I can understand Lazy loading. Keep a flag property in object and whenever we try to get the property of an object just initialize all properties from DB. Pseudo code looks like this: </p>

<pre><code>private function GetAccessor($member) {

if($this-&gt;isLoaded != true) { 
$this-&gt;Load(); //initialize or copy all properties from DB - LAZY LOADING
}
....
</code></pre>

<p>Note: php.net also doesn't mentioned lazy copy anywhere.</p>
