Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53548 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2832 invoked from network); 23 Jun 2011 18:55:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2011 18:55:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:34924] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/83-19628-93C830E4 for ; Thu, 23 Jun 2011 14:55:53 -0400 Received: by pvh10 with SMTP id 10so1371838pvh.29 for ; Thu, 23 Jun 2011 11:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZqqT6CTNidfrUPdXsIyFtaNIkV3TN9D7wZP47h/GMjM=; b=EA6y6SqHMAxS1+YLk8yhdyJ8TjTBrFUPZ2iOU5Hh6U0z5QrLFt8MJTYzBIXetFcCCv feaxq9OYs9Y3RiNhf4yTTxkOP+rZv+icGlPBLx8bB3kA7qDywIwTXttzGxQ+5zknCy8f hyLH/nK78u2FC/Tx1BK3Y1SkGKHPhjSqXLIzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xhebIkBQ0HQHGjyb3CJ21o9kj+wIO2d+yWgm8T6YQghrs/EF4+EajfRw0NHWkVxf/y kwhdrg+VEIJYCnExGa47GxyXzjUO7sNpc9EgZsHMbklZUbbtomjnS7M4MxsFqr7Et3L3 1oqOjYIVtohktCxwikjFmkFfBwNn7prVV0JaE= MIME-Version: 1.0 Received: by 10.68.39.3 with SMTP id l3mr1409829pbk.488.1308855349413; Thu, 23 Jun 2011 11:55:49 -0700 (PDT) Received: by 10.68.63.194 with HTTP; Thu, 23 Jun 2011 11:55:49 -0700 (PDT) In-Reply-To: References: <4E0355AE.4080305@php.net> <4E035B7E.4010703@php.net> Date: Thu, 23 Jun 2011 11:55:49 -0700 Message-ID: To: Martin Scotta Cc: Stefan Neufeind , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Variable scopes for language constructs (foreach, ...) From: chrisstocktonaz@gmail.com (Chris Stockton) Hello, On Thu, Jun 23, 2011 at 8:49 AM, Martin Scotta wro= te: > =A0Martin Scotta >> > foreach ($values as $value) { > =A0// use $value > } > unset ($value); // <-- unset done inside core > > foreach ($values as $key =3D> $value) { > =A0// use $key and $value > } > unset ($key, $value); // <-- unset done inside core > > will this just do the trick? > I think proposed change is extremely counter intuitive to the design of PHP in regard to scoping and would be a very large bc break, PHP is doing exactly what it is suppose to do here and I wouldn't want it any other way. -Chris