Re: Bug #11070 Updated: '@' does not turn off error checking in foreach()
| From: | Chris Lee | Date: | Tue, 28 Aug 2001 14:03:59 +0000 |
| Subject: | Re: Bug #11070 Updated: '@' does not turn off error checking in foreach() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64519@lists.php.net to get a copy of this message | ||
thats fine, I use exactly that right now, just would be nice to see the
@foreach() implemented. thanks.
Chris Lee
lee@mediawaveonline.com
----- Original Message -----
From: "Bug Database" <php-dev@lists.php.net>
To: <lee@mediawaveonline.com>
Sent: Tuesday, August 28, 2001 1:19 AM
Subject: Bug #11070 Updated: '@' does not turn off error checking in
foreach()
> ID: 11070
> Updated by: sander
> Reported By: lee@mediawaveonline.com
> Old Status: Open
> Status: Duplicate
> Bug Type: Feature/Change Request
> Operating System: linux
> PHP Version: 4.0.5
> New Comment:
>
> Duplicate of 6118.
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2001-05-23 18:52:59] cnewbill@php.net
>
> Use....
>
> if (is_array($a))
> foreach ($a as $key => $val) {
> /* Do something */
> }
>
> ....until it is added, which it may not be.
>
> -Chris
>
> ------------------------------------------------------------------------
>
> [2001-05-23 18:47:32] lee@mediawaveonline.com
>
> it would be nice to see the '@' turn off error reporting on the foreach()
command. ie.
>
> <?php
> foreach($test as $pos => $val)
> {
>
> }
> ?>
> gives an error because $test is not set.
>
> <?php
> foreach(@$test as $pos => $val)
> {
>
> }
> ?>
> gives an error because its the wrong data type.
>
> <?php
> @foreach($test as $pos => $val)
> {
>
> }
> ?>
> gives a syntax error. it would be nice if this last command worked :)
>
> Chris Lee
> lee@mediawaveonline.com
>
>
>
> ------------------------------------------------------------------------
>
>
>
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at
http://bugs.php.net/?id=11070&edit=2
>