php4-beta | 199912
Date: 12/17/99
- Next message: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Previous message: Gergely Madarasz: "Re: [PHP4BETA] cvs: /php4 configure.in"
- In reply to: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Next in thread: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Reply: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If returning refrences can be done (haven't checked it out yet) we should
decide on one kind of behaviour. I woudln't make this configurable.
Andi
On Fri, 17 Dec 1999, Andrei Zmievski wrote:
> On Fri, 17 Dec 1999, Andi Gutmans wrote:
> > At 02:48 AM 12/17/99 +0100, Thies C. Arntzen wrote:
> > >zeev, andi -
> > >
> > >would it be hard to implement this syntax, currently there's no good way
> > >of traversion an array *without* coping the values (very bad if you have
> > >lot's of subarrays). also we should enable foreach for objects as well i
> > >think...
> >
> > It has been a while since we have touched foreach(). We should maybe
> > consider changing it from copying to being a reference. I remember this was
> > problematic but I'll try and think about it. It probably does make more
> > sense as a reference.
>
> I feel that for consistency's sake and other considerations, it would be
> better to allow the user to specify whether foreach() uses copy or
> reference. Can it be done that way instead of hard-coding how the
> assignment is done?
>
> -Andrei
>
> If you find a job that you love, you'll
> never work another day in your life.
> - Mark Jackson
>
-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>
- Next message: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Previous message: Gergely Madarasz: "Re: [PHP4BETA] cvs: /php4 configure.in"
- In reply to: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Next in thread: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Reply: Andrei Zmievski: "Re: [PHP4BETA] request: foreach ($array as $key => &$value)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

