Re: [PHP-DEV] references in arrays

2005-09-15 Thread Ron Korving
Perfect :) I've been doing it wrong all the time, thinking I was improving performance. It's good to know how things really work under the hood. Thanks, Ron "Zeev Suraski" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > At 13:35 15/09/2005, Ron Korving wrote: > >Hi, > > > >For p

Re: [PHP-DEV] references in arrays

2005-09-15 Thread Zeev Suraski
At 13:35 15/09/2005, Ron Korving wrote: Hi, For performance' sake, I have to know if this is true: Is it the case that when I do this: array(0,1,2), "two" => array(4,5,6)); $one = $array["one"]; ?> That $one is not a copy, but a reference to $array["one"] and will only become a copy when I

[PHP-DEV] references in arrays

2005-09-15 Thread Ron Korving
Hi, For performance' sake, I have to know if this is true: Is it the case that when I do this: array(0,1,2), "two" => array(4,5,6)); $one = $array["one"]; ?> That $one is not a copy, but a reference to $array["one"] and will only become a copy when I alter the contents of $one? I know this i