Reply to Re: copy of object is a reference in PHP5

Your name:

Reply:


Posted by groups2 on 10/26/07 04:58

On Oct 25, 6:17 pm, Thomas Hamacher <da...@nurfuerspam.de> wrote:
> grou...@reenie.org schrieb:
>
> > On Oct 25, 2:05 pm, JustinCarmony <carm...@gmail.com> wrote:
> >> You can also explicitly code what is to happen when an object is
> >> cloned by using the __clone() class function.
> > $label=new geocellobj();
> > $label->setalign('right');
> > array($label->settext('unique test'), $label->settext('different
> > text));
> > I don't think cloning will help me.
>
> Well, just clone the objects before storing them into the array:
>
> array(clone $label->settext(...), ...)

Ok thanks that works great.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация