Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-03 Thread Stanislav Malyshev
>> What looks better and is easier to read?: For me - the first one. Go figure what that @ is about. Also, 'if' allows you for 'else'. >> it. But, making foreach threat NULL variables as empty arrays, would >> be a goof thing IMO. Maybe it is worth to demote this warning to E_NOTICE? I personal

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-03 Thread derick
On Tue, 3 Jul 2001, Stanislav Malyshev wrote: > Well, if you are around this with @, why not with if(is_array())? What looks better and is easier to read?: 1.: if (is_array($ar)) { foreach ($ar as $element) { } } 2.: @foreach ($ar as $element) { } I clearly see some usefulness

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-03 Thread Stanislav Malyshev
DB>> There are several open feature requests in the bug system to DB>> allow the use of @ to suppress warnings when using a non array DB>> with foreach. What's the status of this? Is this a "hell no!", DB>> "not possible with the current state of the code" or a "when we DB>> get around to it"?

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-02 Thread Zeev Suraski
IL PROTECTED]> >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 &#

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-02 Thread Daniel Beckham
ssage - From: "Zeev Suraski" <[EMAIL PROTECTED]> To: "Daniel Beckham" <[EMAIL PROTECTED]> Cc: "php-dev" <[EMAIL PROTECTED]> Sent: Monday, July 02, 2001 4:19 PM Subject: Re: [PHP-DEV] foreach behavior and error suppression (@foo) > If the ques

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-02 Thread Daniel Beckham
Sent: Monday, July 02, 2001 4:18 PM Subject: Re: [PHP-DEV] foreach behavior and error suppression (@foo) > Perhaps we want to roll this request into the list of proposed changes for > PHP 5? > > --zak > > - Original Message - > From: "Daniel Beckham" <[EMAIL

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-02 Thread Zeev Suraski
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 feat

Re: [PHP-DEV] foreach behavior and error suppression (@foo)

2001-07-02 Thread Zak Greant
Perhaps we want to roll this request into the list of proposed changes for PHP 5? --zak - Original Message - From: "Daniel Beckham" <[EMAIL PROTECTED]> To: "php-dev" <[EMAIL PROTECTED]> Sent: Monday, July 02, 2001 3:16 PM Subject: [PHP-DEV] foreach behavior and error suppression (@foo)