Re: [PHP] Re: CLASS/Object lifetime - more info

2006-02-23 Thread Jochem Maas
Roger Helgesen wrote: ain't that the other way around ? I don't get the context of the question. isn't what supposed to be the otherway around? $var1=$var2 ($var1 is a copy of $var2) $var1= $var2 ($var1 is a reference to $var2) $var1='Test' echo $var2 (outputs Test) roger Jochem Maas

[PHP] Re: CLASS/Object lifetime - more info

2006-02-21 Thread roger helgesen
The function that gives me trouble - function fyll_sub_konto($pv){ foreach($this-subposter AS $konto){ $konto-fyll_fra_post($pv); } } - $this-subposter is the array of CLASS2 function fyll_fra_post($post_vars){ echo

Re: [PHP] Re: CLASS/Object lifetime - more info

2006-02-21 Thread Jochem Maas
REFERENCES. the object you get back is a copy (foreach has the same effect as creating a new variable as in the example below). ... see below ... notice the use of the symbol (and the 'refcount' values). (there is loads of info out there on references/php4/objects out there that explain it

Re: [PHP] Re: CLASS/Object lifetime - more info

2006-02-21 Thread Roger Helgesen
ain't that the other way around ? $var1=$var2 ($var1 is a copy of $var2) $var1= $var2 ($var1 is a reference to $var2) $var1='Test' echo $var2 (outputs Test) roger Jochem Maas wrote: REFERENCES. the object you get back is a copy (foreach has the same effect as creating a new variable as in