Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22299 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50088 invoked by uid 1010); 9 Mar 2006 17:49:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 50072 invoked from network); 9 Mar 2006 17:49:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2006 17:49:15 -0000 X-Host-Fingerprint: 64.233.162.193 zproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.162.193:18114] helo=zproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3B/AC-27106-B9A60144 for ; Thu, 09 Mar 2006 12:49:15 -0500 Received: by zproxy.gmail.com with SMTP id 8so497712nzo for ; Thu, 09 Mar 2006 09:49:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=saj7fxDQOYuAWC9aeIf6XDPTOCZhWXeUb6iFAbNWgptsAzjiyU9GuYk3KvtPDJc6GmRA4k5wIC8ao2ogqAgO4fP7kdaDFd++LnLQ/EJ9NLzD27OI/z+k6wj8cYjomOfn6VjSaiS+51X8ArKFjKlRGXR4rqZoI4tfnErcK7ydxtY= Received: by 10.65.214.15 with SMTP id r15mr1206629qbq; Thu, 09 Mar 2006 09:49:11 -0800 (PST) Received: by 10.65.22.17 with HTTP; Thu, 9 Mar 2006 09:49:11 -0800 (PST) Message-ID: <6ec19ec70603090949p75b0ec6bg3c7e925312de8b74@mail.gmail.com> Date: Thu, 9 Mar 2006 12:49:11 -0500 To: internals@lists.php.net In-Reply-To: <440D416B.1080705@caedmon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <440C7D6F.7030809@caedmon.net> <28139bc0603061902t2cccc154ie76e7ca62a7ed781@mail.gmail.com> <002701c641a7$59f52620$7d051fac@stumpy> <440D416B.1080705@caedmon.net> Subject: Re: [PHP-DEV] foreach, assigning to a reference, and E_NOTICE From: preinheimer@gmail.com ("Paul Reinheimer") Being the colleague Sean refered to in his first post I thought I might weigh in. While I agree that once I looked at the base case that Sean worked out of my code the problem didn't take too long to recognize, that's not where I first experianced the problem. Problems first rear their head deep within your code, looking at it there I had no idea what was going on, all I could tell was that for some reason I was getting two copies of an object in a foreach loop (I hadn't yet noticed that I was missing one). Once Sean was able to break my code down into the simple base case and replicate the issue I understood what was happening, but just looking at my code as a whole? Not a chance. A warning on strict or or notice would have helped a lot, and that's really what I think a lot of those messages are, notices to the programmer that something odd /may/ happen. as a side note, running the zend code analyzer did not give me any warnings either. paul