Reply to Re: =& when creating new object

Your name:

Reply:


Posted by Michael Fesser on 09/24/07 21:22

..oO(Steve)

>"gosha bine" <stereofrog@gmail.com> wrote in message
>news:46f823bf$0$31121$6e1ede2f@read.cnntp.org...
>>
>> Please read the chapter called "references are not pointers" in the
>> manual.
>
>'chapter' ? oh, you mean the quoted text of a usenet post? may i ask, who is
>jani?

From the manual (not the UCNs):

| They are not like C pointers; instead, they are symbol table aliases.
| Note that in PHP, variable name and variable content are different, so
| the same content can have different names.

>gosha, you'd be wise at this point to draw the distinctions yourself (if not
>capable, use a supported reference [no pun]). but, since references provide
>identical behaviors to pointers

They don't. A pointer contains an address in memory, which could be a
variable or the entry point of a function. You can even point to a
pointer to a pointer - a thing that _cannot_ be done with references,
because a reference is just an alias name for something.

>the only difference that i see is the
>literal words themselves (one, 'pointer', the other, 'reference')...and
>perhaps some symantics somewhere.

Even in C/C++ pointers and references are two different concepts.

>as it is, REFERENCES like POINTERS speak to POINTING TO AN ADDRESS or a COPY
>OF A VALUE AT AN ADDRESS...which is EXACTLY WHAT A POINTER IS/DOES.

Correct, but that's not what a reference does.

Micha

[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

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