> One apparent problem with foreach() is it can misbehave code as
> follows. (4.0.4pl1, 4.0.5RC6)
>
> function foo($a) {
> foreach ($a[0] as $k => $v) {
> echo $k.$v;
> }
> }
>
> $a = 'abc';
> foo($a);
>
> You'll get 'server not found' or browser waiting forever with this
> code. (If you don't, please let me know)
>
Good point but I wouldn't characterize a launguage's or function's
expectation that you use correct syntax as a problem.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP] foreach vs. while(list() = each()) Joe Stump
- Re: [PHP] foreach vs. while(list() = each()) Yasuo Ohgaki
- Re: [PHP] foreach vs. while(list() = each()) Lewis Bergman
- Re: [PHP] foreach vs. while(list() = each()) Plutarck
- Re: [PHP] foreach vs. while(list() = each()) Maxim Derkachev
- Re: [PHP] foreach vs. while(list() = each()) Brian Clark
- Re: [PHP] foreach vs. while(list() = each()) Brian Clark
- RE: [PHP] foreach vs. while(list() = each()) Tim Ward
- Re[2]: [PHP] foreach vs. while(list() = each()) Maxim Derkachev
- RE: Re[2]: [PHP] foreach vs. while(list() = each()) Tim Ward
- RE: Re[2]: [PHP] foreach vs. while(list() = each(... Philip Olson

