Re: foreach behavior and error suppression (@foo)
| From: | Zeev Suraski | Date: | Mon, 02 Jul 2001 21:52:09 +0000 |
| Subject: | Re: foreach behavior and error suppression (@foo) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-58756@lists.php.net to get a copy of this message | ||
We may actually make an attempt at it in the engine 2 :)
At 00:33 3/7/2001, Daniel Beckham wrote:
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:-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/There are several open feature requests in the bug system to allow theuseof @ to suppress warnings when using a non array with foreach. What'sthestatus of this? Is this a "hell no!", "not possible with the currentstateof 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 -- 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