You are here: Re: =& when creating new object « PHP Programming Language « IT news, forums, messages
Re: =& when creating new object

Posted by Steve on 09/25/07 03:07

"gosha bine" <stereofrog@gmail.com> wrote in message
news:46f84fbb$0$31121$6e1ede2f@read.cnntp.org...
> Michael Fesser wrote:
>> .oO(gosha bine)
>>
>>> Michael Fesser wrote:
>>>> No! References have their uses, even in PHP5. You don't need them for
>>>> objects anymore, but in many other cases they can still be necessary.
>>> I can't think of any situation where references would be necessary or at
>>> least useful. Would you care to provide some examples?
>>
>> Let's say I have a structure of nested arrays, like a tree. For
>> convenience reasons I want to access a particular element just by giving
>> the "path" to it, like "first level/second level/third level". Now the
>> access function has to tokenize the string and walk down the array tree.
>>
>> If I would just want to read the value of a particular element, I would
>> not need any references at all, copies would be fine. But if I want to
>> change the value, it has to be done in the original array. So the access
>> function has to keep track of where it actually is in the array - it
>> always has to point to the current element while walking down the tree.
>>
>
> Well, for this particular task (and if, for some reason, you have to
> reinvent the DOMDocument wheel) the code can look like this:

yes, well we quite got off topic by claiming that now in php 5 referencing
literally is not needed. and that, i believe, was a tangent that you
provided...and then boldly asked for examples of, which both micha and i
gave to you. and now, you want to get back into an isolated instance that
doesn't require it. we call that a 'strawman'.

if you keep making sweeping statements that are not true about php, i'll be
happy to continually thwart them. i suppose that's why you killfile me. and
even though you may, everyone else can read all the posts. that kind of puts
you at a disadvantage. ;^)

 

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

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