You are here: Re: [PHP] Wikimedia - php4 « PHP « IT news, forums, messages
Re: [PHP] Wikimedia - php4

Posted by Robert Cummings on 09/21/05 08:14

On Wed, 2005-09-21 at 01:08, Rasmus Lerdorf wrote:
> Robert Cummings wrote:
> > On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote:
> >
> >>And for PHP5 you can just drop all references related to objects and it
> >>will do the right thing.
> >
> >
> > Eeeek, that's not entirely true. Sometimes you want a real reference to
> > an object even in PHP5 :/
>
> $a = new foo();
>
> Will create a reference to the object.
>
> $b = $a;
>
> Now you have 2 references to the same object.
>
> For any sort of normal use, you never need to explicitly create
> references to objects in PHP 5.

I think you mean novice use. There are certainly times when assigning an
object to a variable I want all the values currently referring to that
object to see the update and not just the variable being assigned to. I
understand that objects in PHP5 are passed by reference under normal
assignment, but it's a copy of a reference and not a reference to a
reference.

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

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