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

Your name:

Reply:


Posted by Thomas Hamacher on 10/25/07 22:17

groups2@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(...), ...)

[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

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