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
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
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-
3 matches
Mail list logo