NYCPHP Meetup

NYPHP.org

[nycphp-talk] Pass-by-value and lazy copy

Gary Mort bz-gmort at beezifies.com
Sun Nov 25 15:20:46 EST 2007


Daniel Convissor wrote:
> Hi Gary:
>
> On Thu, Nov 22, 2007 at 08:34:02AM -0500, Gary Mort wrote:
>   
>> So, in the pass by reference talk, it was pointed out that if you do:
>>
>> $a = 100;
>> $b = 100;
>> // At this point in time, $a and $b are still using the same memory to 
>> store their data
>>     
>
> Nope.  They have two separate memory assignments.  But they'll be the 
> same if you do the following:
>
> $a = 100;
> $b = $a;
>
>   

Opps, right, sorry about the typo.

Not relevant to my main question, but it does add confusion to have put 
a bad example up front.

Thanks.
-Gary



More information about the talk mailing list