Re: Re: Strange notation to create object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Cummings wrote:
...
This is intentional behaviour, there are times when you want a copy of a
reference and there are times when you want a reference to a reference.
For instance consider the following:

$foo1 = $foo2 = $foo3 = new a();

$foo2 = new b();

If these were references to references instead of copies of references
then $foo1, $foo2, and $foo3 would all now refer to the newly created b
object.

Cheers,
Rob.

OK I'm pretty clear on it, but now I wonder: is variable assignment (=) the only place where the Zend Engine will copy a reference instead of reference the reference?

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux