Re: arrays of objects

From: Date: Fri, 04 Feb 2000 15:23:54 +0000
Subject: Re: arrays of objects
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-15194@lists.php.net to get a copy of this message
On Fri, 04 Feb 2000, Stephanie Wehner wrote: > This will print test1,test2,test1 . This would not be that annoyind cause I can > do $some_array[0]->assignTest("foo") as well. However if I would do that in a > class > then things become a problem since I can't do $this->foo->bar() for example. > > Is there a way how this can still be done ? Or is it simply a bug ? When you put objects in array it actually puts a copy in there not a reference, and this results in the behavior you're seeing. -Andrei * There is no knowledge that is not power. *

« previous php.dev (#15194) next »