|
Posted by gosha bine on 09/27/07 16:47
Summercool wrote:
> On Sep 27, 8:43 am, gosha bine <stereof...@gmail.com> wrote:
>
>> The manual is incorrect at this point. Object variables in php5 are
>> assigned by value, just like in php4, but this very value is different
>> in php5 - it's a pointer to the object, not the object itself. But this
>> is essentially another story and has nothing to do with references.
>>
>> --
>> gosha bine
>
> i think pointer and reference are the same thing, like in Java and
> Ruby.
The term "reference" can be used in the generic sense, describing a
value that is used to access another value. In this sense, a pointer is
a (kind of) reference. However, in c++ and php the word "reference" has
another meaning, and describes some specific construct, that has nothing
to do with pointers. Object variables in php5 are pointers and not
references (in c++/php sense).
> In PHP, what the manual calls "reference" is actually not a reference
> in other languages... it is like an alias or (a nickname).
>
Good that you understand this. It means your original problem is cleared
up. ;)
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
[Back to original message]
|