Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62758 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13309 invoked from network); 3 Sep 2012 17:35:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 17:35:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:61731] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/A2-20751-D6AE4405 for ; Mon, 03 Sep 2012 13:35:42 -0400 Received: by lbbgp3 with SMTP id gp3so2704033lbb.29 for ; Mon, 03 Sep 2012 10:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SuSJ/S/Oy5eW42mjRtnxqw5j+eq/3rhDVPOHrHTNMaQ=; b=No/8ORQeFsxTSPU1RjXSeedXwrsg1xvLm9JBCHnjtBFYCbgWKaEncf9d67S44HN7Ti OrUubUGaZkBKOBk6e0G52+6fACes8LMmHi6Ljrcih8eWF9Aekx39grf3ZvLsXIiCL/NR t1GnGjPMzuj+qKshF7YNx9WQA/pR3IjPf4w/c0ZDU6fBgWs41hv+AG4/Fw4ry0w0P373 rYW1MKo+vTkSGjjtaAxN3+60HlzczjLUIlYLPz4GZ/UdASTZ4kbVPyUmfK7Qt7EJ8Gjz eXRTEwS1se44ueinmeQRfqd0m/ssHHtK52Gi1tqzlVoi8W0VjHCTUNQgBq2mi11YgZ1m MEzw== MIME-Version: 1.0 Received: by 10.152.110.40 with SMTP id hx8mr14861338lab.9.1346693738086; Mon, 03 Sep 2012 10:35:38 -0700 (PDT) Received: by 10.112.12.178 with HTTP; Mon, 3 Sep 2012 10:35:38 -0700 (PDT) In-Reply-To: References: <20120902230741.TSGJ23973.aamtaout03-winn.ispmail.ntl.com@p2> Date: Mon, 3 Sep 2012 13:35:38 -0400 Message-ID: To: Derick Rethans Cc: Laruence , Jared Williams , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Foreach list behaviour From: theanomaly.is@gmail.com (Sherif Ramadan) On Mon, Sep 3, 2012 at 4:20 AM, Derick Rethans wrote: > > Ew, that's quite nasty (in both cases). Is there a way how we could turn > those into a notice or so? > > cheers, > Derick > Sorry, hit reply instead of reply-all... list($a,$b) = 1; var_dump($a,$b); /* NULL NULL */ This doesn't throw notices anywhere else... why should it throw notices in foreach? I guess the only logical answer would be to notify you if you were using scalar values with foreach and list, but then we don't notify you if you're using scalar values with list anywhere else in the language anyway. I'm starting to see huge inconsistencies with how list is being implemented in foreach.