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 Robert Cummings on 06/24/05 18:49

On Fri, 2005-06-24 at 10:02, Jason Barnett wrote:
> Robert Cummings wrote:
> ...
> >
> >
> > There's a difference between a reference to a reference and a copy of a
> > reference *hehehe*.
> >
> > Cheers,
> > Rob.
>
> Dear diary: jackpot!
>
> Now that makes sense. And am I correctly filling in the blanks when I
> guess that $foo3 = $aObj is merely copying the reference instead of
> referencing the reference? I probably could have written that more
> clearly, but I think you get what I'm saying.

Yeah, *grin*. And on that note, there are times when you will actually
want $foo = &new SomeClass(); versus $foo = new SomeClass(); since
assigning by reference will break any previous references -- something I
forgot to mention to Matthew Weier when he challenged the relevance of
the snippet I sent.

Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

 

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

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