Reply to Re: in PHP 5, $obj1 = $obj2 not the same as $obj1 =& $obj2

Your name:

Reply:


Posted by ZeldorBlat on 09/27/07 16:30

On Sep 27, 12:12 pm, Summercool <Summercooln...@gmail.com> wrote:
>
> i think pointer and reference are the same thing, like in Java and
> Ruby.
> In PHP, what the manual calls "reference" is actually not a reference
> in other languages... it is like an alias or (a nickname).

Correct -- it is a "symbol table alias."

>From the manual:

"References in PHP are a means to access the same variable content by
different names. 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."

Personally I think that's much simpler than the reference model in
other languages.

Also be aware of the distinction between "passing by reference" (as
in, passing to a function) and assigning references.

[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

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