Re: foreach behavior and error suppression (@foo)
| From: | Daniel Beckham | Date: | Mon, 02 Jul 2001 21:33:03 +0000 |
| Subject: | Re: foreach behavior and error suppression (@foo) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-58752@lists.php.net to get a copy of this message | ||
I know this will be also shot down, but at least I tried. What about the
possiblity of foreach simply acting on the variable as if it was list($var)
or array($var)? It seems that it wouldn't break any existing behavior, but
would only make foreach more flexible.
Daniel
----- Original Message -----
From: "Zeev Suraski" <zeev@zend.com>
To: "Daniel Beckham" <danbeck@dealnews.com>
Cc: "php-dev" <php-dev@lists.php.net>
Sent: Monday, July 02, 2001 4:19 PM
Subject: Re: [PHP-DEV] foreach behavior and error suppression (@foo)
> If the question is about
> @foreach(...) ...
>
> Then the answer is somewhere between 'hell no!' and 'not possible with the
> current state of the code'. foreach is a statement, whereas @ is an
> operator that works on expressions...
>
> At 00:16 3/7/2001, Daniel Beckham wrote:
> >There are several open feature requests in the bug system to allow the
use
> >of @ to suppress warnings when using a non array with foreach. What's
the
> >status of this? Is this a "hell no!", "not possible with the current
state
> >of the code" or a "when we get around to it"?
> >
> >Thanks,
> >
> >Daniel
> >
> >
> >--
> >PHP Development Mailing List <http://www.php.net/>
> >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-dev-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> Zeev Suraski <zeev@zend.com>
> CTO & co-founder, Zend Technologies Ltd.
> http://www.zend.com/
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>