You are here: Re: Any difference between these two? « PHP Programming Language « IT news, forums, messages
Re: Any difference between these two?

Posted by Chung Leong on 12/08/05 04:48

ZeldorBlat wrote:
> Yeah -- I like PHP's reference model a lot, mainly for it's simplicity:
> every single "variable" is just a "label" for some value in memory.
> Creating a "reference" is really just a way of creating another label
> for that same value in that same spot in memory. Of course there are
> some rules about what is always assigned by reference and what is
> always copied.

Well, simple logic could leads to scenarios that aren't that easily
understandable. My original question arose out of this function I'm
writing, which returns a large array of arrays. Knowing that PHP's
copy-on-write mechanism creates copies when "references" are returned,
I didn't want to return a whole array-ful of them. The line $lines[] =&
$line does give the impression that that's what being created.

 

Navigation:

[Reply to this 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

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