You are here: Re: [PHP] Re: Strange notation to create object « PHP « IT news, forums, messages
Re: [PHP] Re: Strange notation to create object

Posted by Jason Barnett on 06/24/05 23:06

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

 

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

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