Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22166 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7432 invoked by uid 1010); 7 Mar 2006 06:41:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7417 invoked from network); 7 Mar 2006 06:41:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2006 06:41:50 -0000 X-Host-Fingerprint: 69.60.120.90 iconoclast.caedmon.net Linux 2.4/2.6 Received: from ([69.60.120.90:41541] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 6D/DA-22029-D2B2D044 for ; Tue, 07 Mar 2006 01:41:49 -0500 Received: from localhost ([127.0.0.1]) by iconoclast.caedmon.net with esmtp (Exim 3.35 #1 (Debian)) id 1FGVrt-00058O-00; Tue, 07 Mar 2006 01:40:25 -0500 Message-ID: <440D2ADB.80300@caedmon.net> Date: Tue, 07 Mar 2006 01:40:27 -0500 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Xuefer CC: Sara Golemon , internals@lists.php.net References: <440C7D6F.7030809@caedmon.net> <28139bc0603061902t2cccc154ie76e7ca62a7ed781@mail.gmail.com> <002701c641a7$59f52620$7d051fac@stumpy> <28139bc0603062209x3be25866md3b6807555c98f1c@mail.gmail.com> In-Reply-To: <28139bc0603062209x3be25866md3b6807555c98f1c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] foreach, assigning to a reference, and E_NOTICE From: sean@caedmon.net (Sean Coates) > it's not the problem of the second foreach, any usage of $j after the > 1st foreach as &$j will hurt Yes. I thought it was clear that I understand this. I guess not. My point is that foreach is doing something that isn't immediately obvious. The same is true of your for loop, but to a lesser extent, IMO (as I don't expect your for loop to ONLY read from $i). I don't want to start a discussion on references. I'm just trying to clear up a non-obvious case. S