> 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]

Reply via email to