Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-31 Thread speedy
Hello Jochem, Wednesday, January 31, 2007, 7:41:42 PM, you wrote: > use of 'global' is bad practice in anything that resembles a complex/real > application. your function has no control over the what $arr is and any piece > of > code code change $arr into *anything* at any time. > instead I wou

Re: Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-31 Thread Martin Alterisio
2007/1/30, speedy <[EMAIL PROTECTED]>: Hello Martin, > Tuesday, January 30, 2007, 8:45:50 PM, you wrote: > > function f() > { >global $arr; > >foreach($arr as $k=>$v) { >$v->do_something(); >} > } > > I don't see your point anywhere... foreach iterates over a copy of > the

Re[2]: [PHP] nested, referenced foreach & implicit current array pointer issues

2007-01-30 Thread speedy
Hello Martin, > Tuesday, January 30, 2007, 8:45:50 PM, you wrote: > > function f() > { >global $arr; > >foreach($arr as $k=>$v) { >$v->do_something(); >} > } > > I don't see your point anywhere... foreach iterates over a copy of > the array so where is the potential side-